Skip to content
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] tags pool experiment #1521

Closed
wants to merge 2 commits into from

Conversation

lifeart
Copy link
Contributor

@lifeart lifeart commented Dec 6, 2023

This PR is create to check GC behaviour on framework benchmark if we start using tags and transactions pools.
Where transaction pool is retainable and tags pool is predefined

Idea here is:

  • trying to reuse Tracker classes, including it's Sets and prepare initial pool (reusable)
  • Prepare DirtyableTag initial pool (not reusble)
  • Prepare UpdatableTag initial pool (not reusable)

In abstract ember app we always need some amount of Tracker, DirtyableTag and UpdatableTag classes.
And it may be a case where we will see GC improvements. And will be able to ship default pool sizes or allow developers to customize it from global variable or code replace functionality or babel plugin.

@lifeart lifeart force-pushed the experiment-tags-pool branch 4 times, most recently from cfd6ede to 20984fe Compare December 6, 2023 13:51
@lifeart lifeart marked this pull request as draft December 7, 2023 08:55
@lifeart lifeart force-pushed the experiment-tags-pool branch 4 times, most recently from 2805078 to c996c6c Compare December 21, 2023 14:37
@lifeart lifeart force-pushed the experiment-tags-pool branch from c996c6c to 222bd30 Compare December 22, 2023 16:13
@lifeart
Copy link
Contributor Author

lifeart commented Dec 22, 2023

locally, on 20 runs: (10k items rendering)

 Benchmark Results Summary    

duration phase estimated improvement -50ms [-64ms to -37ms] OR -1.66% [-2.12% to -1.25%]
renderStart phase estimated improvement -47ms [-61ms to -39ms] OR -2.7% [-3.47% to -2.2%]
glimmer-render-10000-rows-start phase no difference [-6ms to 7ms]
paint phase no difference [-1ms to 1ms]

ci, 100 runs: (10k items rendering)

    Benchmark Results Summary    
duration phase estimated improvement -126ms [-147ms to -108ms] OR -2.15% [-2.5% to -1.85%]
renderStart phase estimated improvement -117ms [-134ms to -101ms] OR -3.59% [-4.09% to -3.1%]
glimmer-render-10000-rows-start phase estimated improvement -12ms [-20ms to -3ms] OR -0.47% [-0.82% to -0.11%]
paint phase estimated regression +1ms [0ms to 2ms] OR +0.74% [0.07% to 1.42%]
[17:53:49] Generating Benchmark Reports [started]
[17:53:52] Generating Benchmark Reports [completed]

Full featured bench results (23 Dec 2023)

    Benchmark Results Summary    

duration phase estimated improvement -85ms [-117ms to -54ms] OR -1.43% [-1.96% to -0.91%]
render1000Items1End phase estimated improvement -5ms [-9ms to -1ms] OR -0.97% [-1.84% to -0.18%]
clearItems1End phase estimated improvement -6ms [-6ms to -5ms] OR -20.02% [-20.96% to -19.07%]
render1000Items2End phase estimated improvement -5ms [-8ms to -3ms] OR -1.33% [-1.94% to -0.7%]
clearItems2End phase estimated regression +1ms [1ms to 1ms] OR +4.61% [3.43% to 5.71%]
render10000Items1End phase estimated regression +35ms [14ms to 57ms] OR +0.93% [0.36% to 1.52%]
clearItems3End phase estimated improvement -3ms [-4ms to -2ms] OR -1.43% [-2.07% to -0.77%]
render1000Items3End phase estimated improvement -94ms [-98ms to -90ms] OR -21.91% [-22.73% to -21.05%]
append1000Items1End phase estimated improvement -35ms [-38ms to -31ms] OR -8.38% [-9.16% to -7.43%]
updateEvery10thItem1End phase estimated regression +7ms [7ms to 7ms] OR +42.53% [41.2% to 44.09%]
selectFirstRow1End phase estimated regression +3ms [2ms to 3ms] OR +7.22% [5.72% to 9.09%]
selectSecondRow1End phase estimated improvement -5ms [-5ms to -4ms] OR -38.11% [-41.3% to -34.92%]
removeFirstRow1End phase no difference [0ms to 2ms]
removeSecondRow1End phase estimated improvement -2ms [-3ms to -1ms] OR -9.21% [-14.38% to -4.86%]
swapRows1End phase estimated regression +3ms [1ms to 4ms] OR +4.38% [2.24% to 6.92%]
clearItems4End phase estimated regression +2ms [1ms to 2ms] OR +4.3% [2.66% to 5.95%]
paint phase no difference [0ms to 0ms]

artifact-1.pdf

2x pool size:

    Benchmark Results Summary    

duration phase estimated improvement -151ms [-175ms to -127ms] OR -2.52% [-2.9% to -2.11%]
render1000Items1End phase estimated improvement -12ms [-16ms to -7ms] OR -2.35% [-3.26% to -1.47%]
clearItems1End phase estimated improvement -6ms [-7ms to -6ms] OR -21.54% [-22.72% to -20.49%]
render1000Items2End phase estimated improvement -18ms [-21ms to -16ms] OR -4.6% [-5.2% to -3.98%]
clearItems2End phase estimated improvement -4ms [-4ms to -4ms] OR -15.49% [-16.43% to -14.59%]
render10000Items1End phase estimated improvement -111ms [-133ms to -88ms] OR -2.96% [-3.54% to -2.35%]
clearItems3End phase estimated improvement -2ms [-3ms to -1ms] OR -0.98% [-1.64% to -0.34%]
render1000Items3End phase no difference [-5ms to 4ms]
append1000Items1End phase no difference [-5ms to 1ms]
updateEvery10thItem1End phase estimated regression +2ms [2ms to 3ms] OR +14.41% [13.07% to 15.87%]
selectFirstRow1End phase no difference [0ms to 1ms]
selectSecondRow1End phase estimated improvement -4ms [-5ms to -4ms] OR -34.95% [-37.71% to -32.11%]
removeFirstRow1End phase no difference [-2ms to 0ms]
removeSecondRow1End phase estimated regression +7ms [6ms to 8ms] OR +40.89% [34.57% to 46.51%]
swapRows1End phase estimated regression +2ms [1ms to 3ms] OR +2.97% [1.48% to 4.2%]
clearItems4End phase estimated improvement -3ms [-3ms to -2ms] OR -6.7% [-7.97% to -5.37%]
paint phase no difference [0ms to 0ms]
image

artifact-1.pdf

@lifeart lifeart force-pushed the experiment-tags-pool branch 3 times, most recently from 31cf834 to 1b1fdc0 Compare December 23, 2023 13:20
@lifeart lifeart changed the title tags-pool-experiment [perf] tags pool experiment Dec 23, 2023
prepare tags in the beginning of transaction

increase amount of tags in pool x2
@lifeart lifeart force-pushed the experiment-tags-pool branch from 63c0b5a to 1f314bf Compare December 24, 2023 20:18
@lifeart
Copy link
Contributor Author

lifeart commented Dec 24, 2023

Dec 25, updated benchmark

image
    Benchmark Results Summary    

duration phase estimated regression +345ms [246ms to 441ms] OR +2.09% [1.49% to 2.67%]
renderEnd phase estimated improvement -3ms [-4ms to -1ms] OR -3.77% [-6.16% to -1.45%]
render1000Items1End phase estimated improvement -35ms [-47ms to -25ms] OR -2.73% [-3.64% to -1.95%]
clearItems1End phase no difference [-2ms to 3ms]
render1000Items2End phase estimated improvement -11ms [-18ms to -1ms] OR -1.03% [-1.77% to -0.13%]
clearItems2End phase estimated improvement -2ms [-4ms to 0ms] OR -3.25% [-6.38% to -0.71%]
render5000Items1End phase no difference [-32ms to 38ms]
clearManyItems1End phase estimated improvement -3ms [-6ms to -1ms] OR -1.32% [-2.43% to -0.21%]
render5000Items2End phase estimated regression +430ms [251ms to 520ms] OR +10.25% [5.97% to 12.4%]
clearManyItems2End phase estimated improvement -7ms [-10ms to -4ms] OR -2.82% [-4.16% to -1.52%]
render1000Items3End phase estimated improvement -19ms [-34ms to -16ms] OR -2.18% [-3.94% to -1.83%]
append1000Items1End phase estimated improvement -12ms [-20ms to 0ms] OR -1.27% [-2.02% to -0.05%]
append1000Items2End phase estimated improvement -17ms [-26ms to -10ms] OR -1.73% [-2.61% to -1%]
updateEvery10thItem1End phase no difference [-6ms to 2ms]
updateEvery10thItem2End phase no difference [-1ms to 0ms]
selectFirstRow1End phase no difference [-1ms to 0ms]
selectSecondRow1End phase estimated regression +6ms [0ms to 10ms] OR +4.48% [0.18% to 7.02%]
removeFirstRow1End phase estimated regression +12ms [8ms to 17ms] OR +4.65% [3.15% to 6.67%]
removeSecondRow1End phase estimated regression +13ms [7ms to 16ms] OR +5.22% [2.94% to 6.39%]
swapRows1End phase no difference [-2ms to 1ms]
swapRows2End phase no difference [0ms to 8ms]
clearItems4End phase estimated regression +13ms [10ms to 16ms] OR +9.25% [7.25% to 11.03%]
paint phase no difference [0ms to 0ms]

artifact-1.pdf

@lifeart
Copy link
Contributor Author

lifeart commented Jan 11, 2024

Closing as not significant

@lifeart lifeart closed this Jan 11, 2024
@lifeart lifeart deleted the experiment-tags-pool branch January 11, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant