-
Notifications
You must be signed in to change notification settings - Fork 649
Keeping SyntaNode's kind and parent kind for optimization #8515
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
Keeping SyntaNode's kind and parent kind for optimization #8515
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
orizi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orizi reviewed 2 of 2 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)
49347d0 to
010cd59
Compare
79a3650 to
1353cbc
Compare
orizi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orizi reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)
1353cbc to
2fb49ce
Compare
010cd59 to
c071884
Compare
orizi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orizi reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)
c071884 to
8dfde2b
Compare
2fb49ce to
3295969
Compare
orizi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orizi reviewed 1 of 1 files at r4, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)
8dfde2b to
a6b60a0
Compare
3295969 to
809ced5
Compare
809ced5 to
7903922
Compare
a6b60a0 to
291a855
Compare
Merge activity
|

TL;DR
Cache syntax node kind to avoid database lookups.
What changed?
This PR optimizes the
SyntaxNodestruct by caching the node's kind and parent kind directly in the struct, rather than looking them up from the database each time they're needed. The changes include:kindandparent_kindfields to theSyntaxNodestructnew_syntax_nodefunction to accept and store the kind parameterkind()method to return the cached value instead of looking it upparent_kind()method to return the cached value