utopia icon indicating copy to clipboard operation
utopia copied to clipboard

dont run domWalker on scroll

Open liady opened this issue 1 year ago • 3 comments

Problem: When we scroll the canvas, we always trigger the domWalker, since the check for nothingChanged always returns false (even though it's just the canvas coordinates) image

Fix: This is the first fix for this. The simplest fix is to have a special case for SCROLL_CANVAS action - where the domWalker doesn't need to run.

** Note: ** A more complex fix can be to have the actions themselves state whether they need the domWalker to run or not - or have another flag in addition to nothingChanged that checks only for domWalker relevant changes.

Manual Tests: I hereby swear that:

  • [X] I opened a hydrogen project and it loaded
  • [X] I could navigate to various routes in Preview mode

liady avatar Apr 30 '24 10:04 liady

Try me

github-actions[bot] avatar Apr 30 '24 10:04 github-actions[bot]

#12002 Bundle Size — 62.35MiB (~+0.01%).

042f2a7(current) vs 6339ece master#11995(baseline)

[!WARNING] Bundle contains 58 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#12002
     Baseline
#11995
Regression  Initial JS 45.44MiB(~+0.01%) 45.44MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 20.95% 20.93%
No change  Chunks 31 31
No change  Assets 34 34
No change  Modules 4371 4371
No change  Duplicate Modules 503 503
No change  Duplicate Code 30.81% 30.81%
No change  Packages 467 467
No change  Duplicate Packages 58 58
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#12002
     Baseline
#11995
Regression  JS 62.34MiB (~+0.01%) 62.34MiB
Improvement  HTML 10.94KiB (-0.34%) 10.98KiB

Bundle analysis reportBranch fix/scroll-performanceProject dashboard

relativeci[bot] avatar Apr 30 '24 10:04 relativeci[bot]

Performance test results: (Chart1)
(Chart2)

github-actions[bot] avatar Apr 30 '24 10:04 github-actions[bot]