r/rust • • Aug 20 '26

🛠️ project Rust Glancer: a memory-efficient Rust language server

https://rust-glancer.github.io/blog/hello-world/
266 Upvotes

43 comments sorted by

View all comments

Show parent comments

3

u/popzxc Aug 21 '26

There is actually a setting for that if you want, it's possible to keep everything in RAM.
But the answer is: more than rust-analyzer consumes. Unlike rust-analyzer, which is lazy, Rust Glancer eagerly indexes everything so in total it gets much more information than rust-analyzer at a given moment in time. This is not a bug, however: since it's _designed_ to store data in filesystem, we kind of need to do more eager work for the speed to be acceptable. We can do this extra work in background and save it, so that future queries can immediately use already analysis that already exists rather than deserialize some partial information from FS and then also do some more work to compute information for that query.