-
Notifications
You must be signed in to change notification settings - Fork 211
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
Improve filter profile data #4313
Conversation
✅ Meticulous spotted zero visual differences across 379 screens tested: view results. Last updated for commit 9296146. This comment will update as new commits are pushed. |
8511bc9
to
f623f29
Compare
f623f29
to
20517a8
Compare
Updating it to slice the records instead of marking full rows as null
It's slightly worse, but removes some of the footguns from just marking whole rows as null |
Previously we were rebuilding the record when we performed a filtering operation. This caused a lot of copying of data. Instead we now just mark the filtered our values as null in the array bitmap.
name old time/op new time/op delta FilterData-10 5.00ms ± 2% 0.38ms ± 1% -92.37% (p=0.000 n=10+10) name old alloc/op new alloc/op delta FilterData-10 6.28MB ± 0% 0.00MB ± 1% -99.94% (p=0.000 n=10+10) name old allocs/op new allocs/op delta FilterData-10 3.91k ± 1% 0.07k ± 2% -98.19% (p=0.000 n=10+10)
This prevents us from having to skip over records later and other footguns where we Sum which accesses the data directly and ignores nulls
20517a8
to
7ae0838
Compare
afab681
to
d56d156
Compare
d56d156
to
9296146
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.
Very nice!
Improving ergonomics seems the right way forward. Overall this performance so much better, so I'm fine paying that small price. 👍
Mark fields as null instead of rebuilding record during filtering.
thor@thors-MacBook-Pro ~/.../parca/pkg/query % benchstat before.txt after.txt name old time/op new time/op delta FilterData-10 5.00ms ± 2% 0.38ms ± 1% -92.37% (p=0.000 n=10+10) name old alloc/op new alloc/op delta FilterData-10 6.28MB ± 0% 0.00MB ± 1% -99.94% (p=0.000 n=10+10) name old allocs/op new allocs/op delta FilterData-10 3.91k ± 1% 0.07k ± 2% -98.19% (p=0.000 n=10+10)