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

fix isolated rerenders #4382

Merged
merged 1 commit into from
May 11, 2024
Merged

fix isolated rerenders #4382

merged 1 commit into from
May 11, 2024

Conversation

JoviDeCroock
Copy link
Member

Fixes #4381

When an isolated leaf component kept re-rendering we'd throw an error, to counter-act this we check in diffed whether we have finished diffing this component

Copy link

github-actions bot commented May 11, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -2% - +1% (-21.98ms - +13.08ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +1% (-0.09ms - +0.16ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +4% (-0.85ms - +2.94ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -3% - +4% (-0.49ms - +0.72ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +1% (-0.98ms - +0.91ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +1% (-0.08ms - +0.02ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -3% - +0% (-0.80ms - +0.12ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -1% - +4% (-0.23ms - +1.10ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -4% - +1% (-0.56ms - +0.16ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +0% (-0.03ms - +0.01ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +3% (-0.06ms - +0.04ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local886.57ms - 902.67ms-unsure 🔍
-2% - +1%
-21.98ms - +13.08ms
preact-main883.49ms - 914.64msunsure 🔍
-1% - +2%
-13.08ms - +21.98ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local26.75ms - 26.75ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main26.75ms - 26.75msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.59ms - 16.82ms-unsure 🔍
-1% - +1%
-0.09ms - +0.16ms
preact-main16.61ms - 16.73msunsure 🔍
-1% - +1%
-0.16ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.75ms - 1.75ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.75ms - 1.75msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local72.46ms - 76.13ms-unsure 🔍
-1% - +4%
-0.85ms - +2.94ms
preact-main72.78ms - 73.71msunsure 🔍
-4% - +1%
-2.94ms - +0.85ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local14.01ms - 14.40ms-unsure 🔍
-4% - +1%
-0.56ms - +0.16ms
preact-main14.10ms - 14.71msunsure 🔍
-1% - +4%
-0.16ms - +0.56ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.45ms - 17.33ms-unsure 🔍
-3% - +4%
-0.49ms - +0.72ms
preact-main16.36ms - 17.20msunsure 🔍
-4% - +3%
-0.72ms - +0.49ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.86ms - 4.86ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main4.86ms - 4.86msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
replace1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local67.80ms - 69.20ms-unsure 🔍
-1% - +1%
-0.98ms - +0.91ms
preact-main67.89ms - 69.16msunsure 🔍
-1% - +1%
-0.91ms - +0.98ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.65ms - 3.67ms-unsure 🔍
-1% - +0%
-0.03ms - +0.01ms
preact-main3.65ms - 3.68msunsure 🔍
-0% - +1%
-0.01ms - +0.03ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local28.27ms - 29.03ms-unsure 🔍
-1% - +2%
-0.27ms - +0.70ms
preact-main28.13ms - 28.73msunsure 🔍
-2% - +1%
-0.70ms - +0.27ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local34.08ms - 35.78ms-faster ✔
1% - 7%
0.18ms - 2.69ms
preact-main35.45ms - 37.29msslower ❌
0% - 8%
0.18ms - 2.69ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local25.40ms - 25.91ms-unsure 🔍
-2% - +1%
-0.47ms - +0.28ms
preact-main25.47ms - 26.03msunsure 🔍
-1% - +2%
-0.28ms - +0.47ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local23.77ms - 24.51ms-unsure 🔍
-3% - +2%
-0.65ms - +0.47ms
preact-main23.81ms - 24.64msunsure 🔍
-2% - +3%
-0.47ms - +0.65ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local29.05ms - 30.75ms-unsure 🔍
-5% - +3%
-1.53ms - +0.93ms
preact-main29.32ms - 31.08msunsure 🔍
-3% - +5%
-0.93ms - +1.53ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local23.33ms - 24.48ms-unsure 🔍
-2% - +5%
-0.44ms - +1.07ms
preact-main23.10ms - 24.08msunsure 🔍
-4% - +2%
-1.07ms - +0.44ms
-
text-update

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.74ms - 1.81ms-unsure 🔍
-5% - +1%
-0.08ms - +0.02ms
preact-main1.76ms - 1.84msunsure 🔍
-1% - +5%
-0.02ms - +0.08ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.17ms - 1.23ms-unsure 🔍
-5% - +3%
-0.06ms - +0.04ms
preact-main1.18ms - 1.24msunsure 🔍
-3% - +5%
-0.04ms - +0.06ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local27.84ms - 28.21ms-unsure 🔍
-3% - +0%
-0.80ms - +0.12ms
preact-main27.94ms - 28.79msunsure 🔍
-0% - +3%
-0.12ms - +0.80ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.25ms - 1.25ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.25ms - 1.25msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local30.15ms - 31.41ms-unsure 🔍
-1% - +4%
-0.23ms - +1.10ms
preact-main30.14ms - 30.55msunsure 🔍
-4% - +1%
-1.10ms - +0.23ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.70ms - 3.70ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main3.70ms - 3.70msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link

github-actions bot commented May 11, 2024

Size Change: +34 B (+0.06%)

Total Size: 61.4 kB

Filename Size Change
debug/dist/debug.js 3.71 kB +11 B (+0.3%)
debug/dist/debug.module.js 3.71 kB +13 B (+0.35%)
debug/dist/debug.umd.js 3.79 kB +10 B (+0.26%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.09 kB
compat/dist/compat.module.js 4.01 kB
compat/dist/compat.umd.js 4.14 kB
devtools/dist/devtools.js 231 B
devtools/dist/devtools.module.js 240 B
devtools/dist/devtools.umd.js 314 B
dist/preact.js 4.63 kB
dist/preact.min.js 4.67 kB
dist/preact.min.module.js 4.66 kB
dist/preact.min.umd.js 4.69 kB
dist/preact.module.js 4.65 kB
dist/preact.umd.js 4.71 kB
hooks/dist/hooks.js 1.55 kB
hooks/dist/hooks.module.js 1.59 kB
hooks/dist/hooks.umd.js 1.63 kB
jsx-runtime/dist/jsxRuntime.js 976 B
jsx-runtime/dist/jsxRuntime.module.js 949 B
jsx-runtime/dist/jsxRuntime.umd.js 1.06 kB
test-utils/dist/testUtils.js 453 B
test-utils/dist/testUtils.module.js 454 B
test-utils/dist/testUtils.umd.js 536 B

compressed-size-action

@coveralls
Copy link

Coverage Status

coverage: 99.609%. remained the same
when pulling 8cd2376 on fix-many-rerenders
into 6449692 on main.

@coveralls
Copy link

Coverage Status

coverage: 99.609%. remained the same
when pulling 8cd2376 on fix-many-rerenders
into 6449692 on main.

@JoviDeCroock JoviDeCroock merged commit cece8c3 into main May 11, 2024
13 checks passed
@JoviDeCroock JoviDeCroock deleted the fix-many-rerenders branch May 11, 2024 17:33
@JoviDeCroock JoviDeCroock mentioned this pull request May 15, 2024
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.

False positive on render loop detection
3 participants