Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kohei316
Copy link
Contributor

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.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 24, 2024
@Kohei316 Kohei316 force-pushed the improve-cache branch 5 times, most recently from a9525ce to b5f5f18 Compare August 24, 2024 05:44
@Veykril
Copy link
Member

Veykril commented Aug 29, 2024

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 Veykril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 3, 2024
@bors
Copy link
Collaborator

bors commented Sep 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Semantics construction performance
4 participants