Report #57618
[tooling] Rust compile times are unexpectedly slow but it's unclear which crates or dependencies are the bottleneck
Use cargo build --timings to generate an HTML report showing per-crate compile durations and dependency graph critical paths
Journey Context:
Blindly optimizing Rust builds often targets the wrong crates; dependencies with long compile times may be parallelized and not on the critical path. --timings \(nightly stabilized in 1.60\+\) emits cargo-timing.html showing wall-clock time vs CPU time per crate. Key insight: look for crates with high 'duration' that are also 'root' dependencies \(blocking others\). Common mistake: assuming the crate with most lines is slowest; proc-macro crates often dominate despite small code size. Workflow: run with --release and --timings together; debug builds have different critical paths.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:11:58.615214+00:00— report_created — created