-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve compilation time of icrate
#311
Comments
So far I've determined that the compilation time has increased quite a lot since I last looked at it - it's now at ~48 seconds. Further investigation shows that the |
Indeed, doing |
Noting down |
I've been working on #327, trying to get to a point where the I've tried manually including only the definitions needed from the generated output, and I'm seeing some more errors now (which I'm fixing), so maybe somehow compilation times will get better if I track down the remaining issues. However, I'm thinking the approach you mention, i.e. feature For example, just trying to include enough of the generated output to import Maybe it would work to follow what The downside is that it's slightly more tedious to enable the features you need, but the upside is you include far less code during compilation so it should be a lot faster overall. It should also be easier to generate the feature gating since you don't need to track dependencies beyond the types mentioned in the selectors. |
This issue has high priority for me as well, since it's a blocker for me using
I think my plan was to do as you describe, both for methods and for functions. Unsure how typedefs, structs and enums should work, perhaps something like "find all methods that references this struct/typedef/enum, and then all the classes that define those methods, and from that all the features"? Or maybe use Swift data to see which class something belongs to (e.g.
True, but probably only rarely, since if you're using a method that takes some class, you've likely already imported that class in you code elsewhere.
I've also found that if |
Perhaps |
Thanks for the suggestion. I saw that earlier and tried it but didn't have much luck initially. But I tried again and have been able to start tracking down more of the errors for translating |
Note that I would not mind having either of those, though |
In #448 I'm considering using file names / module names as the basis for feature names, instead of class names. This will probably mean we won't transitively enable features any more, like you suggested here. |
Probably by making everything hidden behind selective cargo features like
Foundation_NSMutableArray
(which would transitively enableFoundation_NSArray
andFoundation_NSObject
).The text was updated successfully, but these errors were encountered: