You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustdoc: search.index/ grows on every cargo doc run of an unchanged crate #166236
A-rustdoc-searchArea: Rustdoc's search featureC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
rustdoc 1.102.0-nightly (5f4effd 2026-11-13) shows the same sizes
x86_64-unknown-linux-gnu
Additional Details
On a real workspace documented with --document-private-items, each rerun
added about 500 bytes to search.index/root.js and 53 shards. After a week
the index held 770 MB, and rustdoc used 28 GB of memory to merge it. On an
empty doc folder, the same run takes 2.8 GB and 21 s.
Workaround: remove target/doc before cargo doc.
Possibly related: #136802 (a corrupt search-index.js after cargo doc runs
with different configurations).
A-rustdoc-searchArea: Rustdoc's search featureC-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Activity
GuillaumeGomez commentedon Nov 23, 2026
cc @notriddle
GuillaumeGomez commentedon Nov 23, 2026
Actually taking a look...
GuillaumeGomez commentedon Nov 23, 2026
Fixed in #166420. Thanks for the detailed reproducer @simonsan, it allowed me to save quite a lot of time. :)
Rollup merge of rust-lang#166420 - GuillaumeGomez:search-index-regen,…
Rollup merge of rust-lang#166420 - GuillaumeGomez:search-index-regen,…
Rollup merge of rust-lang#166420 - GuillaumeGomez:search-index-regen,…
Rollup merge of rust-lang#166420 - GuillaumeGomez:search-index-regen,…
Unrolled build for #166420 in rollup 166507
Rollup merge of #166420 - GuillaumeGomez:search-index-regen, r=notriddle