-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only create OnDiskCache
in incremental compilation mode
#79216
Conversation
This lets us skip doing useless work when we're not in incremental compilation mode.
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit d00ed01 with merge 7ae610e245278cb0996eebc08f707e48e63ea9b7... |
if sess.opts.incremental.is_none() { | ||
return OnDiskCache::new_empty(sess.source_map()); | ||
return None; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new_empty
should be cheap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but we want to skip running any operations on it (e.g. storing diagnostics, looking up query results). The alternative would be to insert checks for incremental mode into all of the methods in OnDiskCache
☀️ Try build successful - checks-actions |
Queued 7ae610e245278cb0996eebc08f707e48e63ea9b7 with parent fe98231, future comparison URL. |
Finished benchmarking try commit (7ae610e245278cb0996eebc08f707e48e63ea9b7): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
@bors r+ rollup |
📌 Commit d00ed01 has been approved by |
@bors rollup- |
☀️ Test successful - checks-actions |
This lets us skip doing useless work when we're not in incremental
compilation mode.