sublimelsp / LSP-rust-analyzer

Convenience package for rust-analyzer
MIT License
70 stars 11 forks source link

Is it possible to cache the index results? #22

Closed rwols closed 1 month ago

rwols commented 3 years ago

It looks like rust-analyzer always starts to re-index the entire project anytime I start it. This can take quite a while. Is there a way to cache this index on disk so that it doesn't do that?

rwols commented 3 years ago

Might need an issue in the rust-analyzer repo. Though I'm no rust expert.

rchl commented 3 years ago

I'll just note that VSCode extension also doesn't seem to be doing any caching. Restarting VSCode reindexes the project.

Rapptz commented 3 years ago

This is unfortunately by design. The indexing is done by cargo metadata and there is a local level of caching from cargo's end, typically with the dependencies so the next time it is faster. However rust-analyzer still needs to build its own data in memory so it knows the project structure and data. Any improvement there would need to be within the server.

rwols commented 3 years ago

Already here I guess https://github.com/rust-analyzer/rust-analyzer/issues/4712

rchl commented 1 month ago

Not something we would can handle on the package side anyway.