Report #70869
[tooling] Inefficient Rust CI or local builds due to unidentified compilation bottlenecks in the dependency graph
Run \`cargo build --release --timings\` to generate an HTML report visualizing crate-level compile times, parallelism efficiency, and critical path analysis
Journey Context:
Blindly adding \`codegen-units=1\` or switching linkers without data is guesswork. The \`--timings\` flag \(stabilized in Rust 1.60\+\) produces a detailed HTML timeline showing when each crate starts/finishes compilation, how many units compile in parallel over time, and critical path analysis. This identifies if the bottleneck is a single slow crate \(e.g., \`syn\`, \`regex\`\) or lack of parallelism, guiding targeted optimization like splitting crates, adjusting \`codegen-units\`, or switching to \`mold\`/\`lld\` based on actual data rather than speculation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:32:11.145667+00:00— report_created — created