-
-
Notifications
You must be signed in to change notification settings - Fork 922
Description
I noticed that incremental builds are now much slower than they used to be, so I did some testing. Im doing this with the following commands:
# make sure dependencies are built, can be cancelled after it reaches lemmy_utils
cargo build
# should be a full incremental build, dont reuse any
cargo clean -p lemmy_utils
# measure build performance, disable sccache
RUSTC_WRAPPER='' cargo build --timings
I only did one run per commit and the results arent exactly consistent, but we can still draw some conclusions:
- current main (6310f55): 6m 42s
- after tracingcall in spawn_try_task , rebased on main: 3m 29s
So #3581 doesnt improve compile time at all.
Edit: Looks like this actually helps a lot but I want to do more testing.
- after connections work with both conn and pool (1d38aad): 6m 45s
- before connections work with both conn and pool (73492af): 2m 47s
#3420 is the worst offender, the build time is almost than doubled. We definitely need to find a solution for this, or otherwise revert the change
- tag 0.18.1: 179s
- tag 0.18.1 with strip symbols and disable debug info: 118s
- tag 0.18.0: 47s
0.18.1 is much slower, specifically for compiling lemmy_server according to the html report. This is most likely from adding additional code in that crate like prometheus metrics. The solution is to move as much as possible into lemmy_routes so that it can be compiled in parallel with api and apub crates.
cc @dullbananas
Edit: All measurements updated so they are not polluted by sccache. They should be quite accurate now.