Skip to content

Conversation

@JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Nov 29, 2025

We need to calculate a strict equality bailout before ever touching shouldComponentUpdate else we risk early calculating next values which bails either way.

The issue presents itself when we have two context providers nested

FooContext
  BarContext
    Child

Imagine that we queue up a render of FooContext and BarContext, the depth algorithm will make it render top-down which means that when FooContext finishes we will enter BarContext. This will bail due to the strict equality bailout, before this change we'd first run sCU which would consolidate the hooks-state due to reconciling _nextValue. When the reconciled component of BarContext would render again it would bail when signals was imported due to its sCU

@github-actions
Copy link

github-actions bot commented Nov 29, 2025

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +0% (-3.85ms - +3.84ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.07ms - +0.01ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +1% (-1.09ms - +0.80ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -1% - +2% (-0.13ms - +0.31ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +2% (-0.13ms - +1.34ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -3% - +4% (-0.06ms - +0.08ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +1% (-0.23ms - +0.31ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -2% - +4% (-0.51ms - +1.07ms)
    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 🔍 -5% - +7% (-0.36ms - +0.57ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -1% - +4% (-0.01ms - +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.01ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local984.24ms - 990.62ms-unsure 🔍
-0% - +0%
-3.85ms - +3.84ms
preact-main985.29ms - 989.57msunsure 🔍
-0% - +0%
-3.84ms - +3.85ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local19.19ms - 19.19ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main19.19ms - 19.19msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.53ms - 16.58ms-unsure 🔍
-0% - +0%
-0.07ms - +0.01ms
preact-main16.56ms - 16.61msunsure 🔍
-0% - +0%
-0.01ms - +0.07ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.35ms - 69.69ms-unsure 🔍
-2% - +1%
-1.09ms - +0.80ms
preact-main68.50ms - 69.83msunsure 🔍
-1% - +2%
-0.80ms - +1.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local7.55ms - 8.22ms-unsure 🔍
-5% - +7%
-0.36ms - +0.57ms
preact-main7.45ms - 8.11msunsure 🔍
-7% - +5%
-0.57ms - +0.36ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.39ms - 16.81ms-unsure 🔍
-1% - +2%
-0.13ms - +0.31ms
preact-main16.45ms - 16.57msunsure 🔍
-2% - +1%
-0.31ms - +0.13ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.72ms - 3.72ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main3.72ms - 3.72msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #5230
  • Commit: b9c9870

duration

VersionAvg timevs preact-localvs preact-main
preact-local61.89ms - 62.99ms-unsure 🔍
-0% - +2%
-0.13ms - +1.34ms
preact-main61.35ms - 62.33msunsure 🔍
-2% - +0%
-1.34ms - +0.13ms
-

usedJSHeapSize

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

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local26.16ms - 26.81ms-unsure 🔍
-3% - +1%
-0.71ms - +0.20ms
preact-main26.43ms - 27.05msunsure 🔍
-1% - +3%
-0.20ms - +0.71ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local32.71ms - 33.82ms-unsure 🔍
-3% - +2%
-1.09ms - +0.60ms
preact-main32.87ms - 34.15msunsure 🔍
-2% - +3%
-0.60ms - +1.09ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local32.55ms - 33.90ms-unsure 🔍
-3% - +2%
-0.94ms - +0.82ms
preact-main32.73ms - 33.84msunsure 🔍
-2% - +3%
-0.82ms - +0.94ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local25.74ms - 26.13ms-unsure 🔍
-1% - +1%
-0.33ms - +0.25ms
preact-main25.77ms - 26.19msunsure 🔍
-1% - +1%
-0.25ms - +0.33ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local25.03ms - 26.60ms-unsure 🔍
-4% - +4%
-1.16ms - +0.97ms
preact-main25.19ms - 26.62msunsure 🔍
-4% - +4%
-0.97ms - +1.16ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local21.50ms - 21.97ms-unsure 🔍
-1% - +2%
-0.16ms - +0.50ms
preact-main21.33ms - 21.79msunsure 🔍
-2% - +1%
-0.50ms - +0.16ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 160
  • Built by: CI #5230
  • Commit: b9c9870

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.89ms - 1.99ms-unsure 🔍
-3% - +4%
-0.06ms - +0.08ms
preact-main1.87ms - 1.97msunsure 🔍
-4% - +3%
-0.08ms - +0.06ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local0.99ms - 1.04ms-unsure 🔍
-1% - +4%
-0.01ms - +0.04ms
preact-main0.98ms - 1.02msunsure 🔍
-4% - +1%
-0.04ms - +0.01ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.69ms - 34.11ms-unsure 🔍
-1% - +1%
-0.23ms - +0.31ms
preact-main33.68ms - 34.04msunsure 🔍
-1% - +1%
-0.31ms - +0.23ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local29.89ms - 31.06ms-unsure 🔍
-2% - +4%
-0.51ms - +1.07ms
preact-main29.67ms - 30.73msunsure 🔍
-3% - +2%
-1.07ms - +0.51ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.96ms - 2.97ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
preact-main2.96ms - 2.96msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-

tachometer-reporter-action v2 for CI

@github-actions
Copy link

Size Change: +8 B (+0.01%)

Total Size: 79.2 kB

Filename Size Change
dist/preact.js 4.78 kB +2 B (+0.04%)
dist/preact.min.js 4.8 kB +1 B (+0.02%)
dist/preact.min.module.js 4.8 kB +1 B (+0.02%)
dist/preact.min.umd.js 4.83 kB +1 B (+0.02%)
dist/preact.mjs 4.79 kB +1 B (+0.02%)
dist/preact.module.js 4.79 kB +1 B (+0.02%)
dist/preact.umd.js 4.83 kB +1 B (+0.02%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.17 kB
compat/dist/compat.mjs 4.1 kB
compat/dist/compat.module.js 4.1 kB
compat/dist/compat.umd.js 4.24 kB
debug/dist/debug.js 3.85 kB
debug/dist/debug.mjs 3.85 kB
debug/dist/debug.module.js 3.85 kB
debug/dist/debug.umd.js 3.93 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.mjs 274 B
devtools/dist/devtools.module.js 274 B
devtools/dist/devtools.umd.js 346 B
hooks/dist/hooks.js 1.54 kB
hooks/dist/hooks.mjs 1.57 kB
hooks/dist/hooks.module.js 1.57 kB
hooks/dist/hooks.umd.js 1.61 kB
jsx-runtime/dist/jsxRuntime.js 1.01 kB
jsx-runtime/dist/jsxRuntime.mjs 985 B
jsx-runtime/dist/jsxRuntime.module.js 985 B
jsx-runtime/dist/jsxRuntime.umd.js 1.08 kB
test-utils/dist/testUtils.js 473 B
test-utils/dist/testUtils.mjs 477 B
test-utils/dist/testUtils.module.js 477 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@JoviDeCroock JoviDeCroock merged commit 7b74b40 into v10.x Nov 29, 2025
14 checks passed
@JoviDeCroock JoviDeCroock deleted the fix-cascading-renders branch November 29, 2025 13:19
@JoviDeCroock JoviDeCroock mentioned this pull request Nov 29, 2025
JoviDeCroock added a commit that referenced this pull request Dec 1, 2025
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.

4 participants