diff options
| author | Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> | 2025-04-29 11:47:37 +0200 |
|---|---|---|
| committer | Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> | 2025-04-29 11:47:37 +0200 |
| commit | 578ea26b8fdf67c830b8991051c1840ff0846e33 (patch) | |
| tree | 865edd7dcfd58f789109435af944b462b04418ca /tests/ui/array-slice-vec/array-not-vector.rs | |
| parent | 4c83e55e2d88ff93155be2784b9f64b91b870e99 (diff) | |
| download | rust-578ea26b8fdf67c830b8991051c1840ff0846e33.tar.gz rust-578ea26b8fdf67c830b8991051c1840ff0846e33.zip | |
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.
Diffstat (limited to 'tests/ui/array-slice-vec/array-not-vector.rs')
0 files changed, 0 insertions, 0 deletions
