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 takes 8.5 GB of memory to document stm32h7 #79103
Similar to but not the same as #78761: rustdoc uses an inordinate amount of memory to document large crates.
heaptrack_gui shows almost a third of the memory being allocated in get_blanket_impls:
However, the peak usage is actually in check_mod_item_types, which rustdoc can't do much about:
Rustdoc should work improving on both the total memory usage and peak memory usage.
This is meant as a tracking issue, since there are issues other than get_blanket_impls causing high memory use, such as #76382. There is a Zulip stream for technical discussion.
. I'm not sure how to upload the full 81 MB file to GitHub, but feel free to ping me here or on Zulip, I'll keep a copy around Here's a link to Google Drive with the full file. Unfortunately DHAT takes a full 50 minutes to run rustdoc on stm32 so it's a pain to collect on your own.
I profiled this recently, and it's down to 1.6 GB - still high, but a lot better than before. I'm going to close this until I find something more specific to track.
Activity
jyn514 commentedon Nov 16, 2020
This is causing docs.rs to have to periodically bump the sandbox limits when documenting stm32 crates: rust-lang/docs.rs#1179.
camelid commentedon Dec 11, 2020
P-medium: it's annoying that it takes so much memory, but it's not like you can't document it. And it's being worked on.
jyn514 commentedon Dec 11, 2020
I ran Rustdoc under DHAT and found that a good tenth of the allocations come from
get_blanket_implsalone:rust/src/librustdoc/clean/blanket_impl.rs
Line 130 in 2225ee1
I'm not sure how to upload the full 81 MB file to GitHub, but feel free to ping me here or on Zulip, I'll keep a copy aroundHere's a link to Google Drive with the full file. Unfortunately DHAT takes a full 50 minutes to run rustdoc on stm32 so it's a pain to collect on your own.jyn514 commentedon Dec 11, 2020
Another 7% just storing the structs themselves:
rust/src/librustdoc/passes/collect_trait_impls.rs
Line 128 in 2225ee1
7 remaining items
jyn514 commentedon Dec 16, 2020
The strange thing that most of the time is not spent on
build_extern_trait_impl, it's somewhere else incollect_trait_impls.jyn514 commentedon Dec 16, 2020
Almost all the time in
collect_trait_implsis being spent on synthetic impls, specificallyrust/src/librustdoc/passes/collect_trait_impls.rs
Line 19 in 4031f7b
jyn514 commentedon Dec 16, 2020
get_blanket_implstakes about 10x as long asget_synthetic_impls, but they're both pretty slow.Auto merge of rust-lang#80041 - jyn514:shrink-item, r=GuillaumeGomez
Auto merge of rust-lang#80071 - jyn514:timings, r=Mark-Simulacrum
Auto merge of rust-lang#80095 - jyn514:stability-on-demand, r=Guillau…
Auto merge of rust-lang#80099 - jyn514:visibility-on-demand, r=Guilla…
Auto merge of rust-lang#80014 - jyn514:box-item-kind, r=nnethercote
jyn514 commentedon Jan 21, 2021
This also impacts
windows-rs.jyn514 commentedon Aug 22, 2021
I profiled this recently, and it's down to 1.6 GB - still high, but a lot better than before. I'm going to close this until I find something more specific to track.