Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable debug info compilation in CI to boost performance. (#779)
Turning off debug info in CI gives us tiny speedups, with potential for more [in some scenarios](https://davidlattimore.github.io/posts/2024/02/04/speeding-up-the-rust-edit-build-run-cycle.html#avoid-linking-debug-info). Most notably there is 30% space savings on artifact size in Linux, really helping with cache pressure and compression/decompression time. We don't really need the benefits of debug info in the CI environment. We're not attaching debuggers there and in case of panics we can still get a backtrace. Thus it's just wasted effort to generate the debug info and then to link it in and cache it. ## Benchmarks I did some minor benchmarking on three different OS setups with Rust 1.83. Every step was repeated four times (1 warmup, then 3 for measuring), but stuff like CPU boost frequency etc was not controlled for. Even so, the numbers are useful for ballparking. I set `CARGO_INCREMENTAL` to `0` to match the CI and measured `cargo clippy -p xilem --locked --profile ci --all-features`. | Windows 11 23H2 | Old | New | Diff | |-----------------|-------------|-------------|------| | Cold duration | 17.40s | 17.21s | -1% | | Warm duration | 0.74s | 0.73s | -1% | | Cache size | 490 801 867 | 485 287 057 | -1% | | macOS 10.15.4 | Old | New | Diff | |---------------|-------------|-------------|------| | Cold duration | 30.58s | 30.34s | -1% | | Warm duration | 1.27s | 1.21s | -5% | | Cache size | 207 200 857 | 200 717 130 | -3% | | Ubuntu 23.10 | Old | New | Diff | |---------------|-------------|-------------|------| | Cold duration | 24.50s | 23.50s | -4% | | Warm duration | 0.84s | 0.87s | +4% | | Cache size | 597 456 507 | 411 918 698 | -31% 🚀 |
- Loading branch information