-
Notifications
You must be signed in to change notification settings - Fork 926
Quite long compilation time #2170
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
Comments
Possibly related #1858 This is something I would be very interested in improving, but I've not had time to really sit down with this yet. Two rather crude approaches could be to split up the crate to allow greater build parallelism, or to add more features to allow people to opt-out of functionality. Similarly messing with increasing the codegen-units might help, although potentially at the cost of less optimal builds. The major bottleneck last time I looked was linking, and LLVM codegen, which makes it hard to optimise without dropping functionality... |
Could you point the direction about linking and codegen? I may take a look, but don’t know where to start 😂 |
https://blog.rust-lang.org/inside-rust/2020/02/25/intro-rustc-self-profile.html might help get you started, it describes how to run the self-profiler to see where the compilation process is spending its time |
I tried the tools, here is the output from
Honestly I totally have no idea what's it about. And the file generated by |
Given the bottleneck is codegen, if one makes the assumption that the execution time is somewhat proportional to the amount of generated LLVM IR, using a tool like |
Hello, @tustvold @wangfenjin for linux, rui314/mold is giving very good improvements. With mold the full builds give only about 10-20% improvements , but the incremental builds are completed in half the time. |
The recent changes to add more dictionary array comparison kernels have really hurt this... I might need to take some time to look into this 🤔 |
Update on this, I've filed a couple of PRs to cut out a fair amount of compile time
And the work on splitting up the arrow-crate (#2594) is on going. This should achieve a couple of things:
|
At least on my computer a full release compilation now takes just under 20 seconds, so I think we can consider this issue closed for now |
Seems the arrow crate is slow to compile, do we have some way to optimize it? Thanks.
Please rename to html when open the file, generated by
cargo build --no-default-features --timings
cargo-timing-20220726T055116Z.html.pdf
The text was updated successfully, but these errors were encountered: