-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: Add toggle to disable cache priming #10810
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
Conversation
crates/rust-analyzer/src/config.rs
Outdated
@@ -215,6 +215,9 @@ config_data! { | |||
/// Join lines merges consecutive declaration and initialization of an assignment. | |||
joinLines_joinAssignments: bool = "true", | |||
|
|||
/// Pre-fill caches on project load. | |||
load_prefillCaches: bool = "true", |
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.
TODO: bikeshed this.
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.
rust-analyzer.cache.prefill
?
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.
This is often called cache warmup
.
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.
rust-analyzer.cache.warmup
would also be good.
a118e08
to
c62e500
Compare
c62e500
to
a68ce62
Compare
bors r+ |
Even if it doesn't prevent the rest of the features from working, cache priming tends to be quite CPU-intensive and can make people think that the load times are worse than they actually are.
It's also less useful in Code and
rust-tools
because the inlay hints and semantic highlighting trigger quite a bit of computation assuming you have a file open in the editor.