mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-11 20:58:54 +00:00
c603b9043f
In https://youtu.be/qvIZZf5dmTE, we've noticed that AstIdMap does a linear lookup when going from SyntaxNode to Id. This leads to accidentally quadratic overall performance. Replace linear lookup with a O(1) hashmap lookup. Future work: don't duplicate `SyntaxNodePtr` in `AstIdMap` and switch to "call site dependency injection" style storage (eg, store a `HashSet<ErasedFileAstId>`). See the explanation of the work here on YouTube https://youtu.be/wvEgymUm7cY :-) |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |