Skip to content

Very long build times in release #115

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

Closed
zeroflaw opened this issue Aug 28, 2020 · 7 comments
Closed

Very long build times in release #115

zeroflaw opened this issue Aug 28, 2020 · 7 comments
Labels
Help Wanted I need outside help for this to happen.

Comments

@zeroflaw
Copy link

I've recently update to version 1.0.0 and found tinyvec as the cause of some extremely long build times (Release only) (0.4.1 = 10 seconds, 1.0.0 = 1 hours)

seems to have something to do with code using ArrayVec the larger the ArrayVec the longer the build time. It seems to also depend on the size of the object as well. I can't post all the code here because it very large, I'll try cut out a minimal example to demonstrate.
MAX_POSITIONS = 200 pub fn new() -> Self { PositionUpdateArray(ArrayVec::<[PositionUpdate; MAX_POSITIONS]>::from_array_len( [PositionUpdate::DEFAULT; MAX_POSITIONS], 0, )) }

Other useful information:
MacOSX
rustc 1.48.0-nightly (397b390cc 2020-08-27)
Debug mode is unaffected, only release mode

@Lokathor
Copy link
Owner

how big is a PositionUpdate value?

@zeroflaw
Copy link
Author

It contains several rust_decimal::Decimal (which don't seem to be a problem)
some custom structs that contains static str and enums (which do seem to be the cause)

I'll try put together a minimal example.

@Lokathor
Copy link
Owner

and with a length of 200, i presume that you're using const generics in here also?

@zeroflaw
Copy link
Author

yes I am using the feature nightly_const_generics

@Lokathor
Copy link
Owner

Possibly related: rust-lang/rust#54540

@Lokathor Lokathor added Bug Something isn't working Help Wanted I need outside help for this to happen. Performance and removed Bug Something isn't working labels Oct 9, 2020
@saethlin
Copy link
Contributor

I've been routinely compiling my benchmark suite with const generics and an array length of 256, and I can confirm it doesn't take an hour to build. At 18 seconds for the compilation of the benchmark binary itself it's not exactly speedy, but I don't think this issue is still a problem.

@Lokathor
Copy link
Owner

Alright. Another issue can be created if this comes up again, closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted I need outside help for this to happen.
Projects
None yet
Development

No branches or pull requests

3 participants