rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Internal: Add caching to improve the Def ID to AST pointer lookup.

Open Kohei316 opened this issue 1 year ago • 1 comments

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-def crate.
  • Modify Semantics to possess the cache.
  • Modify to use the cache through Semantics when searching for sources in hir crate.

Kohei316 avatar Aug 24 '24 05:08 Kohei316

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

Veykril avatar Aug 29 '24 14:08 Veykril

:umbrella: The latest upstream changes (presumably #18022) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Sep 05 '24 12:09 bors

Closing due to inactivity

Veykril avatar Oct 21 '24 09:10 Veykril