rust/compiler/rustc_monomorphize
Piotr Osiewicz 578ea26b8f mono collector: Reduce \# of locking while walking the graph
While profiling Zed's dev build I've noticed that while most of the time `upstream_monomorphizations` takes a lot of time in monomorpization_collector, in some cases (e.g. build of `editor` itself)
the rest of monomorphization_collector_graph_walk dominates it. Most of the time is spent in collect_items_rec.

This PR aims to reduce the number of locks taking place; instead of locking output MonoItems once per children of current node, we do so once per *parent*. We also get to reuse locks for mentioned and used items.
While this commit does not reduce Wall time of Zed's build, it does shave off `cargo build -j1` from 43s to 41.5s.
2025-04-29 11:47:37 +02:00
..
src mono collector: Reduce \# of locking while walking the graph 2025-04-29 11:47:37 +02:00
Cargo.toml Revert "Use workspace lints for crates in compiler/ #138084" 2025-03-10 18:12:47 +08:00
messages.ftl Make missing optimized MIR error more informative 2025-04-01 09:25:12 +00:00