cargo doc in this synthetic large workspace is ~7-8x slower after
nightly-2025-08-20. The regression shape is consistent with rust-lang/rust
#146895 and the suspected rustdoc search-index merge path discussed there. This
artifact is intended as a compact reproducer/evidence bundle, not a standalone
root-cause proof or fix proposal.
# Install required toolchains
rustup toolchain install nightly-2025-08-19 --profile minimal
rustup toolchain install nightly-2025-08-20 --profile minimal
# Current nightly (for -Zrustdoc-mergeable-info workaround test)
rustup toolchain install nightly --profile minimalcd /Users/tianyizhuang/rust-harness-stg0140
python3 gen_synth_ws_v2.py 100 100 synthetic-ws-largeGenerator parameters (deterministic, seed=42):
- 100 crates, 100 items per crate (~40,000 public items: funcs + structs + traits + enums)
- Dependency graph:
- 5 core crates (no dependencies)
- 15 mid crates (each depends on 2-3 core crates)
- 80 leaf crates (each depends on 2-4 mid crates)
- Cross-crate
pub usere-exports from all deps to stress search-index merge
Clean-state policy: each run uses a separate target directory, removed beforehand.
cd synthetic-ws-large
rm -rf target-pre-reg
/usr/bin/time -p cargo +nightly-2025-08-19 doc --workspace --target-dir target-pre-regrm -rf target-post-reg
/usr/bin/time -p cargo +nightly-2025-08-20 doc --workspace --target-dir target-post-regrm -rf target-current-plain
/usr/bin/time -p cargo +nightly doc --workspace --target-dir target-current-plainrm -rf target-current-mergeable
/usr/bin/time -p cargo +nightly doc --workspace --target-dir target-current-mergeable -Zrustdoc-mergeable-info| Run | Toolchain | real (s) | user (s) | Ratio vs baseline |
|---|---|---|---|---|
| Pre-regression | nightly-2025-08-19 (9eb4a2652) | 6.71 | 25.76 | 1.00x |
| Post-regression | nightly-2025-08-20 (05f5a58e8) | 52.02 | 63.22 | 7.75x |
| Current nightly | nightly 2026-05-03 (ad3a598ca) | 47.04 | 59.14 | 7.01x |
| Current + mergeable-info | nightly 2026-05-03 (ad3a598ca) | 7.65 | 28.60 | 1.14x |
Raw timing logs with full metadata (timestamp, host/target, cargo/rustc/rustdoc -Vv, exact command, /usr/bin/time -p output, exit status, clean state):
harness-logs/evidence-146895/timing-large-pre-regression-nightly-2025-08-19.logharness-logs/evidence-146895/timing-large-post-regression-nightly-2025-08-20.logharness-logs/evidence-146895/timing-large-current-nightly-no-workaround.logharness-logs/evidence-146895/timing-large-current-nightly-mergeable-info.log
- Regression reproduces clearly at ~7.75x with this synthetic - well above the 3x meaningful-signal threshold.
- Regression persists on current nightly (May 2026) - issue is not yet fixed in the default path.
-Zrustdoc-mergeable-infoworkaround fully mitigates it.- Parallelism collapses: pre-reg uses ~3.8 cores effectively (25.76s user / 6.71s real), post-reg ~1.2 cores (near-serial), consistent with the "single rustdoc consuming CPU" observation in the issue.
- Suspected related change from the issue discussion: PR #144476 (commit 8365fcb2b840c95eeb0bc377af8bd498fad22245). This synthetic evidence should still be validated by rustdoc maintainers against the real workload.