-
Notifications
You must be signed in to change notification settings - Fork 609
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
perf(relocate): avoid redundant selector position computation #9644
Conversation
e2557f0
to
9dd7466
Compare
Benchmarks for the 1000-column and 10000-column cases:
|
Managed to improve the performance even more by avoiding redundant binding when computing the
|
5bbb660
to
c237526
Compare
Eked out even more (1.5-2x or so) by applying the same strategy as in #9641 re constructing
|
b84aaa1
to
7723f6d
Compare
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.
🚀 (pending a rebase onto main
)
This PR cleans up selector position computation in
relocate
, which was computing selector positions sometimes more than once as well as looping through all parent table columns more than once. For relocate, in general we should be bound in the worst case by the number of columns returned by selector, not by the number of columns in the table. Previously we did this with thepositions
method (deleted in this PR), which would, for every selector used in relocate look at every column. Now, the positions are computed from the inverted_name_locs
dict that lives on Schema objects.Depends on #9641.
Closes #9111.