Rustdoc takes 8.5 GB of memory to document stm32h7 · Issue #79103 · rust-lang/rust (original) (raw)

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:

image

However, the peak usage is actually in check_mod_item_types, which rustdoc can't do much about:

image

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.

cc @adamgreig