-
Notifications
You must be signed in to change notification settings - Fork 121
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
Reduce compile time #586
Reduce compile time #586
Conversation
Codecov ReportBase: 75.34% // Head: 74.29% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #586 +/- ##
==========================================
- Coverage 75.34% 74.29% -1.05%
==========================================
Files 52 53 +1
Lines 7341 7564 +223
==========================================
+ Hits 5531 5620 +89
- Misses 1810 1944 +134
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small thing, otherwise LGTM thanks 👍
Looks like the CI failure is from calloop, which uses thiserror as well and apparently does not specify its minimal version correctly.
And turn futures-channel into a dev-dependency as it is only used by a doc test.
Together with it's syn dependency thiserror takes a non-trivial amount of time to compile. The manual implementations are cleaned up versions of what was previously derived using thiserror.
The only thing syn is used for is parsing string literals. The copied code is about 160 lines.
Previously the smallvec![] macro would check if the elements fit in the inline capacity and generate code to handle both cases. By lifting the check out into wayland-scanner, rustc has to typeck and borrowck less code. This saves about 300ms of building wayland-protocols with all client features.
This makes the code a bit easier and ensures at compile time that the child_spec is never overwritten
This reduces the amount of SmallVec::into_iter and SmallVec::drop calls.
Rebased |
The commits are mostly independent, so if you think any of the commits is bad for maintainability, I can easily drop it. The commits I'm most confident about are: