-
Notifications
You must be signed in to change notification settings - Fork 90
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
Inefficient Builds (15 mins) #461
Comments
Was able to get a 30 minute build.. ouch |
naive attempt:
unfortunately this build fails due to tonic generating code that fails the nightly clippy checks. adding an
works but only for the final crate. let's go deeper:
oh look. a 2.4 GB JSON file for the chrome profiler to play with. which it rightly refused to load. increasing the minimum duration to summary: so the slowness is likely that we have:
each of which define their own set of dependencies that need checking, maybe downloading, and maybe building. if each takes 2mins, we're already over 30mins. naively i'd expect that if we merge these into a single crate we'd end up spending less time dealing with dependencies but having less flexibility to build things individually. |
The guidance for Rust is usually to break projects up into small crates since crates that don't depend on each other can be built in parallel. By looking at an action that missed the cache and picking a single dependency (I'm picking The following log lines appear for serde: cargo build --target x86_64-unknown-linux-musl -p auraed
Downloaded serde v1.0.152
Compiling serde v1.0.152
...
cargo build -p auraescript
Compiling serde v1.0.152
...
cargo build -p aer
Compiling serde v1.0.152
...
cargo clippy --all-features --workspace --exclude auraed --exclude auraescript --exclude aer -- -D clippy::all -D warnings
Checking serde v1.0.152
...
cargo clippy --target x86_64-unknown-linux-musl -p auraed --all-features -- -D clippy::all -D warnings
Checking serde v1.0.152
...
cargo clippy -p auraescript --all-features -- -D clippy::all -D warnings
Checking serde v1.0.152
...
cargo clippy -p aer --all-features -- -D clippy::all -D warnings
# serde does not get checked even though `aer` has a dependency on it
...
cargo install --target x86_64-unknown-linux-musl --path ./auraed --debug --force
Downloaded serde v1.0.158
Compiling serde v1.0.158
...
cargo install --path ./auraescript --debug --force
Compiling serde v1.0.158 Notes:
It looks like we can eliminate two
It is also possible that we can add |
my builds are still slow, but i'm not sure what we can do. maybe we should think about breaking out the monorepo... |
I think there is opportunity for newcomers to the project to help with our current build times.
Right now our current builds can take up to 15 minutes, and I believe there is a lot of repeated and duplicated work. The more compiling and downloading and linking commands we do, the longer the builds.
How do we get build times down to just a few seconds? Maybe less than 60 seconds for the entire project?
The text was updated successfully, but these errors were encountered: