Skip to content
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

Is it possible to cache the index results? #22

Closed
rwols opened this issue Jun 16, 2021 · 5 comments
Closed

Is it possible to cache the index results? #22

rwols opened this issue Jun 16, 2021 · 5 comments

Comments

@rwols
Copy link
Member

rwols commented Jun 16, 2021

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
Copy link
Member Author

rwols commented Jun 16, 2021

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

@rchl
Copy link
Member

rchl commented Jun 16, 2021

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

@Rapptz
Copy link
Contributor

Rapptz commented Jun 19, 2021

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
Copy link
Member Author

rwols commented Jun 26, 2021

Already here I guess rust-lang/rust-analyzer#4712

@rchl
Copy link
Member

rchl commented Sep 24, 2024

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

@rchl rchl closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants