mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 01:25:15 +00:00
Skip query machinery when promoting disk-cached values At the end of an incremental session, exec_cache_promotions walks the green nodes and, for queries that were never used this session, loads their value from the previous session's disk cache into memory so it gets written into the new cache. This load currently goes through the full query execution path and shows up in profiles of incremental builds with few or no changes, which is the motivation for this PR. Instead, this PR only loads the value directly and puts it in the in-memory cache. Perf improvement: -1.3% mean instructions, mostly in incr-unchanged, -0.36% in incr-patched, no regressions, see https://github.com/rust-lang/rust/pull/158059#issuecomment-4827621427. Behavior change: A missing disk value is now a bug instead of a silent recompute.
For more information about how rustc works, see the rustc dev guide.