crater
crater copied to clipboard
Tracking issue: crater is slow
Crater has a number of inefficiencies that can be resolved to make life better for everyone.
Impactful
- [x] https://github.com/rust-lang-nursery/crater/issues/96 - generate-lockfile does a registry update
- [x] https://github.com/rust-lang-nursery/crater/issues/101 - reconsider doing generate-lockfile inside a docker container
- [x] Parallelise
prepare-local - [x] Parallelise
run-tc(currently relies on inherent parallelism of cargo and builds everything into a huge target directory - some complexity here to figure how to manage the shared resources correctly). - [x] Investigate using codegen-units, experiments show it speeds up rustc build a lot, but slows down tests. ThinLTO may help also.
Nice-to-have
- [x] Consider offering a build-only mode (probably build tests as well)
Metrics
- [ ] Monitor which crates are taking the longest and what the long tail of slow crates looks like
- [ ] Get a breakdown of what phases are taking time (e.g. build, test build, testing) to inform future work
Speculative
- [ ] allow cargobomb to distribute over multiple machines
Parallelization of prepare-local and run-tc is now implemented with run-graph --threads N, and build-only crater runs are possible with --mode build-only.
codegen-units are "implemented" IMO due to default support within rustc (i.e., we run with codegen-units at 16 already).