rust-analyzer
rust-analyzer copied to clipboard
Internal: Add caching to improve the Def ID to AST pointer lookup.
Close: #17116
This PR include these changes.
- Implement a cache that maps Def ID to Ast Ptr.
- Modify to use optionally the cache when searching for sources in
hir-defcrate. - Modify
Semanticsto possess the cache. - Modify to use the cache through
Semanticswhen searching for sources inhircrate.
Implement a cache that maps Def ID to Ast Ptr.
Hmm, this seems a bit unnecessary to me. The main idea behind that issue was to cache the parse trees / avoid the LRU cache on the parse query when possible, not the DefId -> AstPtr direction
:umbrella: The latest upstream changes (presumably #18022) made this pull request unmergeable. Please resolve the merge conflicts.
Closing due to inactivity