mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
09b1254eb2
Add `dist.compression-profile` option to control compression speed PR #108534 reduced the size of compressed archives, but (as expected) it also resulted in way longer compression times and memory usage during compression. It's desirable to keep status quo (smaller archives but more CI usage), but it should also be configurable so that downstream users don't have to waste that much time on CI. As a data point, this resulted in doubling the time of Ferrocene's dist jobs, and required us to increase the RAM allocation for one of such jobs. This PR adds a new `config.toml` setting, `dist.compression-profile`. The values can be: * `fast`: equivalent to the gzip and xz preset of "1" * `balanced`: equivalent to the gzip and xz preset of "6" (the CLI defaults as far as I'm aware) * `best`: equivalent to the gzip present of "9", and our custom xz profile The default has also been moved back to `balanced`, to try and avoid the compression time regression for downstream users. I don't feel too strongly on the default, and I'm open to changing it. Also, for the `best` profile the XZ settings do not match the "9" preset used by the CLI, and it might be confusing. Should we create a `custom-rustc-ci`/`ultra` profile for that? r? ``@Mark-Simulacrum``
About bootstrap defaults
These defaults are intended to be a good starting point for working with x.py, with the understanding that no one set of defaults make sense for everyone.
They are still experimental, and we'd appreciate your help improving them! If you use a setting that's not in these defaults that you think others would benefit from, please file an issue or make a PR with the changes. Similarly, if one of these defaults doesn't match what you use personally, please open an issue to get it changed.