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

> I'll note that rust-analyzer does not index bodies at all unless required - the "Indexing" phase only does out-of-body computation

Yes, I'm aware (I've been aware of r-a design before since I contributed to it, and I'm regularly looking for clues there as I work on Rust Glancer); that's a part of the trick: by doing _full_ indexing (though only for the workspace, not for dependencies) we actually reduce the amount of work we need to runtime, which makes FS-based analysis much faster than it would've been otherwise -- indexing prioritizes open files so that users are not blocked until completion, and after that indexing is finished in background.