parca icon indicating copy to clipboard operation
parca copied to clipboard

Improve filter profile data

Open thorfour opened this issue 1 year ago • 2 comments

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)

thorfour avatar Feb 20 '24 19:02 thorfour

✅ 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.

alwaysmeticulous[bot] avatar Feb 20 '24 19:02 alwaysmeticulous[bot]

Updating it to slice the records instead of marking full rows as null

name           old time/op    new time/op    delta
FilterData-10    5.00ms ± 2%    0.39ms ± 2%  -92.13%  (p=0.000 n=10+10)

name           old alloc/op   new alloc/op   delta
FilterData-10    6.28MB ± 0%    0.09MB ± 0%  -98.55%  (p=0.000 n=10+9)

name           old allocs/op  new allocs/op  delta
FilterData-10     3.91k ± 1%     0.18k ± 1%  -95.45%  (p=0.000 n=10+9)

It's slightly worse, but removes some of the footguns from just marking whole rows as null

thorfour avatar Feb 22 '24 18:02 thorfour