-
Notifications
You must be signed in to change notification settings - Fork 98
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 compile times #52
Comments
Compiler performance issues described in #52 are causing the `uom` build to take a significant amount of time when all underlying storage types are enabled. As additional quantities are added this performance gets worse. This commit only tests a few types in order to keep the build time within Appveyor and TravisCI limits.
Initial investigation shows that the |
Include `cargo test --no-run` for the same feature set as `cargo build` to catch these errors in the future. #52 needs to be resolved to reduce compile times before all features can be enabled.
Include `cargo test --no-run` for the same feature set as `cargo build` to catch these errors in the future. #52 needs to be resolved to reduce compile times before all features can be enabled for `cargo test`.
The `si` feature is included when tests are run with a smaller set of storage types. Part of #52.
(Hi from the 'what are you up to this week' thread) Maybe this blogpost about Admittedly, the blog is mostly about binary size, but on the assumption that "more generated code == more compile time", it might pay to have a look. |
I'm pretty sure macro recursion isn't the issue, but reviewing the output of |
Yeah, from the issue description, and the mostly linear time relation with the number of enabled features (excellent benchmark, b.t.w.), it's probably just the linear amount of complex implementations. But who knows, maybe |
Private aliases to public types cause a significant performance bottleneck in the privacy checking phase of compilation. Enable more features in CI build scripts to ensure better test coverage. Part of #52.
Private aliases to public types cause a significant performance bottleneck in the privacy checking phase of compilation. Enable more features in CI build scripts to ensure better test coverage. Part of #52.
I pushed 224db41 recently that makes a big dent in the problem! The issue is related to private type aliases of public types. Making the type alias public cuts a clean build with I did eventually get I'm leaving the issue open for the moment as I want to submit a report upstream. |
Closing this issue. Upstream issue triaged and current |
Compiling
uom
with all features enabled takes a significant amount of time.-Ztime-passes
shows that the issue is in privacy checking:Timing for this pass increases linearly with the number of underlying storage types enabled. Enabling features for underlying storage types adds
impl
blocks and type aliases for existing types. No new types are added. Additionally, allstruct
s andtrait
s arepub
inuom
.The graph below shows compile times, as reported by
cargo
fortest --no-run
in blue andbuild
in red:The text was updated successfully, but these errors were encountered: