Skip to content

Remove will_cache_on_disk_for_key_fn#154591

Draft
zetanumbers wants to merge 6 commits intorust-lang:mainfrom
zetanumbers:refactor_query_fns_and_traits
Draft

Remove will_cache_on_disk_for_key_fn#154591
zetanumbers wants to merge 6 commits intorust-lang:mainfrom
zetanumbers:refactor_query_fns_and_traits

Conversation

@zetanumbers
Copy link
Copy Markdown
Contributor

@zetanumbers zetanumbers commented Mar 30, 2026

Refactors QueryVtables and removes will_cache_on_disk_for_key_fn as unnecessary indirection.

Based and blocked on #154576.

Expecting perf improvements.

Zalathar and others added 6 commits March 30, 2026 20:58
This is the only remaining query with a non-trivial `cache_on_disk_if`
condition, but previous perf experiments indicate that it can be removed
entirely, with little or no measurable effect.
Queries with both `cache_on_disk` and `separate_provide_extern` will only
disk-cache values for local keys.

Other queries with `cache_on_disk` will disk-cache all values unconditionally.
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 30, 2026
@lqd
Copy link
Copy Markdown
Member

lqd commented Mar 30, 2026

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 30, 2026
…<try>

Remove `will_cache_on_disk_for_key_fn`
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 30, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 30, 2026

☀️ Try build successful (CI)
Build commit: 0f75a34 (0f75a344ce44035ffe18148c5886f45b63053573, parent: cf7da0b7277cad05b79f91b60c290aa08a17a6f0)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (0f75a34): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.8% [0.8%, 0.8%] 1
Improvements ✅
(primary)
-0.1% [-0.1%, -0.1%] 2
Improvements ✅
(secondary)
-0.3% [-0.6%, -0.2%] 8
All ❌✅ (primary) -0.1% [-0.1%, -0.1%] 2

Max RSS (memory usage)

Results (primary 4.0%, secondary 2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.0% [4.0%, 4.0%] 1
Regressions ❌
(secondary)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.0% [4.0%, 4.0%] 1

Cycles

Results (primary 2.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% [2.0%, 2.0%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 483.836s -> 484.325s (0.10%)
Artifact size: 394.90 MiB -> 394.81 MiB (-0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants