Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Don't
opt_rpitit_info
as a separate query #109057New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
Don't
opt_rpitit_info
as a separate query #109057Changes from all commits
ce8dae5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'm not sure what's makes the
opt_rpitit_info
query be fired that much, if it's this call or the other one (because there are just 2), but this call could be the one. I was wondering, what if we makefind_by_def_id
called below returnNone
for rpitits and the code on line 256 would just be ...I'm not sure if there's any other situation where
find_by_def_id
returnsNone
and we don't want to doself.live_symbols.insert(id)
, though.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.
With this patch ...
all the tests pass. May worth running perf on this?.
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.
That change seems orthogonal to this one -- this PR still demonstrates that we don't need
opt_rpitit_info
as a query, which is a change I want anyways because storing it in theAssocTy
just seems cleaner.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.
To be clear, if we keep
opt_rpitit_info
around, other PRs may add other calls to the query that may cause regressions. Let's avoid this by fixing the problem at its source. This optimization may also be helpful, feel free to test it if you want, but I'm gonna land this PR I think.There are 5 calls to
opt_rpitit_info
that I can see in the codebase.