Crazy build times on any `opt-level > 0`
Closed this issue · 7 comments
This is building my crate with profile.dev
but opt-level = 1
:
Finished `dev` profile [optimized + debuginfo] target(s) in 39m 36s
And this is with profile.dev
but opt-level = 0
(the default):
Finished `dev` profile [unoptimized + debuginfo] target(s) in 51.69s
The additional almost 39 (!) minutes in the opt-level = 1
are spent with the build hanging on keshvar
.
This is using latest nightly but is reproducible with previous nighlies.
Basically it makes anything remotely resembling a release build that depends on this crate a PITA in my case.
Any idea what I may be doing wrong?
what cargo features (for keshvar lib) did you use?
keshvar = { version = "0.5.0", features = ["search-translations"] }
hmm. This enables compiling the biggest lazy static hashmap (3.4 MB source file) in this lib.
I see.
I'm still curious why this builds in half a second on opt-level=0
and takes almost 40 mins on anything above that. The hashmap gets in there in both cases.
I guess I'm saying: is this worth reporting upstream, to the rustc
team, as something to look into at all?
I guess I'm saying: is this worth reporting upstream, to the rustc team, as something to look into at all?
Ofc. I think it tries to inline the calls and in opt-level=0
it doesn't. Opening a new issue would help a lot.
Hi. Did you report this?
Nope, I had no time.
It's also not a blocker for me as the context I use this crate in doesn't require a release
build. 😁
So I will probably get to it at some stage ... but if it's a blocker for you, by all means, go ahead and create a rustc
issue.