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

[experiment] updated DOM sync approach #1541

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lifeart
Copy link
Contributor

@lifeart lifeart commented Dec 27, 2023

Testing benchmark here, related to: #1540

This is not pure-js implementation, we using "same" reactive primitives as we have at the moment in glimmer-vm.

In scope of this POC we have:

  • Autotracking
  • Derived values
  • Minimal VM
  • Destructors
image
    Benchmark Results Summary    

duration phase estimated improvement -7297ms [-7425ms to -7173ms] OR -45.74% [-46.54% to -44.96%]
renderEnd phase estimated improvement -45ms [-46ms to -44ms] OR -64.53% [-66.13% to -62.92%]
render1000Items1End phase estimated improvement -776ms [-780ms to -765ms] OR -62.56% [-62.92% to -61.66%]
clearItems1End phase estimated improvement -14ms [-57ms to -13ms] OR -22.64% [-88.68% to -20.31%]
render1000Items2End phase estimated improvement -474ms [-482ms to -468ms] OR -47.44% [-48.2% to -46.84%]
clearItems2End phase estimated improvement -7ms [-10ms to -5ms] OR -11.49% [-15.75% to -7.05%]
render5000Items1End phase estimated improvement -2400ms [-2422ms to -2377ms] OR -52.54% [-53.03% to -52.03%]
clearManyItems1End phase estimated improvement -19ms [-21ms to -17ms] OR -8% [-8.97% to -7.12%]
render5000Items2End phase estimated improvement -1886ms [-1901ms to -1872ms] OR -46.2% [-46.55% to -45.85%]
clearManyItems2End phase estimated improvement -30ms [-33ms to -27ms] OR -12.35% [-13.46% to -11.13%]
render1000Items3End phase estimated improvement -26ms [-35ms to -18ms] OR -3.18% [-4.28% to -2.23%]
append1000Items1End phase estimated improvement -524ms [-530ms to -518ms] OR -57.12% [-57.78% to -56.51%]
append1000Items2End phase estimated improvement -470ms [-482ms to -467ms] OR -49.47% [-50.78% to -49.17%]
updateEvery10thItem1End phase estimated improvement -47ms [-49ms to -38ms] OR -28.27% [-29.69% to -23.03%]
updateEvery10thItem2End phase estimated improvement -34ms [-34ms to -33ms] OR -22.35% [-22.54% to -22.21%]
selectFirstRow1End phase estimated improvement -118ms [-118ms to -108ms] OR -78.51% [-78.97% to -72.49%]
selectSecondRow1End phase estimated improvement -81ms [-82ms to -81ms] OR -60.97% [-61.42% to -60.58%]
removeFirstRow1End phase estimated improvement -36ms [-44ms to -33ms] OR -15.45% [-18.91% to -14.42%]
removeSecondRow1End phase estimated improvement -37ms [-46ms to -35ms] OR -16.53% [-20.78% to -15.67%]
swapRows1End phase estimated improvement -32ms [-33ms to -26ms] OR -20.85% [-21.56% to -16.46%]
swapRows2End phase estimated improvement -26ms [-32ms to -17ms] OR -17.09% [-21.65% to -11.45%]
clearItems4End phase estimated improvement -19ms [-32ms to -13ms] OR -12.68% [-21.46% to -8.92%]
paint phase no difference [0ms to 0ms]

artifact-1.pdf

@lifeart lifeart force-pushed the test-dom-sync-approach-perf branch 3 times, most recently from 7df1cf5 to b0821b0 Compare December 27, 2023 12:21
@lifeart
Copy link
Contributor Author

lifeart commented Jan 6, 2024

JS Perf benchmark:

image image image image

@lolmaus
Copy link

lolmaus commented Jan 6, 2024

pngwing com

This is a holiday miracle. 😳

@NullVoxPopuli
Copy link
Contributor

but how do we make glimmer faster?

@NullVoxPopuli
Copy link
Contributor

in your screenshot, is gxt glimmer? or the experimental other thing? 😅

@lifeart
Copy link
Contributor Author

lifeart commented Jan 6, 2024

@NullVoxPopuli it's glimmer-js replacement based on proposed runtime ideas krausest/js-framework-benchmark#1554 (https://github.com/lifeart/glimmer-next)

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.

3 participants