-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Compile times suddenly extremly high #62567
Comments
What was the change that caused the increase? |
I don't know. I can't pinpoint what exactly causes the compile time spikes, but it definitely was this commit. There is nothing really happening, just a new Struct and some some changes to old structs and arguments of functions. I am a newbie, so I don't know what could potentially be dangerous, but the one thing I would say is that I am allocating a lot of memory on the stack and in this commit this will also increase by 150KB |
Perf shows 50% spent in DSE with 25% in PointerMayBeCaptured. Sounds like https://bugs.llvm.org/show_bug.cgi?id=37588. There's a few sources of quadratic behavior in DSE that don't seems to have any simple solution. In the meantime, try to avoid doing a huge amount of stack allocations... |
Good news! Your case is fixed in LLVM 9, likely by https://reviews.llvm.org/rL357257. So this issue will resolve itself when the LLVM 9 update lands. |
Dropping the stack allocations would be a major performance drop :/ |
Great! :D When will it land? Is it in the next offical release? :D |
It's in the nightly: #62592 |
Verified that the build is fast with the current nightly, so closing this issue. |
Since one of my latest changes to my project, the compile times have been extremly high (jumping to >1min from about 15secs).
I tried compiling the lib of this crate (it is to large to post here):
https://github.com/fabianvdW/ChessInRust
with
cargo build--release --lib
Compiler output for release build:
Note that this is with
lto=true
Time to investigate with
-Ztime-passes in nightly
:This, to me, suggests turning LTO off.
With LTO off:
This all started happening after this commit where I made some minor changes.
Before this commit, even with
lto=true
, it looks like this(and is blazingly fast):My stable version:
rustc --version --verbose
:My nightly version:
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: