Skip to content

perf(hooks): stop scanning once an update is required - #5242

Open
JoviDeCroock wants to merge 1 commit into
mainfrom
perf/hooks-scu-scan-shortcut
Open

perf(hooks): stop scanning once an update is required#5242
JoviDeCroock wants to merge 1 commit into
mainfrom
perf/hooks-scu-scan-shortcut

Conversation

@JoviDeCroock

Copy link
Copy Markdown
Member

Stop scanning hook state once a pending update requires a render, while preserving the chained shouldComponentUpdate call and committing all pending state before rendering.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -1% - +1% (-7.49ms - +6.53ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +2% (-0.14ms - +0.37ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -5% - +1% (-3.15ms - +0.64ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -4% - +3% (-0.67ms - +0.47ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -4% - +1% (-3.10ms - +0.85ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +3% (-0.09ms - +0.06ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +3% (-0.23ms - +0.69ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -3% - +6% (-0.60ms - +1.41ms)
    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% - +3% (-0.22ms - +0.17ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.01ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -2% - +6% (-0.02ms - +0.06ms)
    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-local803.63ms - 814.75ms-unsure 🔍
-1% - +1%
-7.49ms - +6.53ms
preact-main805.40ms - 813.95msunsure 🔍
-1% - +1%
-6.53ms - +7.49ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.51ms - 17.00ms-unsure 🔍
-1% - +2%
-0.14ms - +0.37ms
preact-main16.56ms - 16.71msunsure 🔍
-2% - +1%
-0.37ms - +0.14ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local57.07ms - 58.79ms-unsure 🔍
-5% - +1%
-3.15ms - +0.64ms
preact-main57.49ms - 60.87msunsure 🔍
-1% - +5%
-0.64ms - +3.15ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local5.06ms - 5.31ms-unsure 🔍
-4% - +3%
-0.22ms - +0.17ms
preact-main5.06ms - 5.36msunsure 🔍
-3% - +4%
-0.17ms - +0.22ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.16ms - 16.77ms-unsure 🔍
-4% - +3%
-0.67ms - +0.47ms
preact-main16.08ms - 17.04msunsure 🔍
-3% - +4%
-0.47ms - +0.67ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.74ms - 3.74ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
preact-main3.74ms - 3.75msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #5918
  • Commit: 804fab9

duration

VersionAvg timevs preact-localvs preact-main
preact-local81.67ms - 84.80ms-unsure 🔍
-4% - +1%
-3.10ms - +0.85ms
preact-main83.15ms - 85.56msunsure 🔍
-1% - +4%
-0.85ms - +3.10ms
-

usedJSHeapSize

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

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local26.70ms - 27.59ms-unsure 🔍
-2% - +2%
-0.65ms - +0.53ms
preact-main26.82ms - 27.59msunsure 🔍
-2% - +2%
-0.53ms - +0.65ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local32.28ms - 33.35ms-unsure 🔍
-2% - +3%
-0.63ms - +0.92ms
preact-main32.11ms - 33.23msunsure 🔍
-3% - +2%
-0.92ms - +0.63ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local31.37ms - 32.84ms-unsure 🔍
-4% - +3%
-1.19ms - +0.97ms
preact-main31.43ms - 33.00msunsure 🔍
-3% - +4%
-0.97ms - +1.19ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local28.59ms - 29.55ms-unsure 🔍
-2% - +3%
-0.58ms - +0.79ms
preact-main28.47ms - 29.46msunsure 🔍
-3% - +2%
-0.79ms - +0.58ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local20.26ms - 20.50ms-unsure 🔍
-1% - +1%
-0.19ms - +0.12ms
preact-main20.31ms - 20.52msunsure 🔍
-1% - +1%
-0.12ms - +0.19ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local26.64ms - 27.54ms-unsure 🔍
-3% - +1%
-0.92ms - +0.20ms
preact-main27.12ms - 27.78msunsure 🔍
-1% - +3%
-0.20ms - +0.92ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 220
  • Built by: CI #5918
  • Commit: 804fab9

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.89ms - 2.01ms-unsure 🔍
-5% - +3%
-0.09ms - +0.06ms
preact-main1.92ms - 2.02msunsure 🔍
-3% - +5%
-0.06ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.04ms - 1.10ms-unsure 🔍
-2% - +6%
-0.02ms - +0.06ms
preact-main1.02ms - 1.08msunsure 🔍
-6% - +2%
-0.06ms - +0.02ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local22.26ms - 23.04ms-unsure 🔍
-1% - +3%
-0.23ms - +0.69ms
preact-main22.17ms - 22.66msunsure 🔍
-3% - +1%
-0.69ms - +0.23ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.27ms - 1.27ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.27ms - 1.27msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
update10th1k
  • Browser: chrome-headless
  • Sample size: 160
  • Built by: CI #5918
  • Commit: 804fab9

duration

VersionAvg timevs preact-localvs preact-main
preact-local22.73ms - 24.29ms-unsure 🔍
-3% - +6%
-0.60ms - +1.41ms
preact-main22.46ms - 23.74msunsure 🔍
-6% - +3%
-1.41ms - +0.60ms
-

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

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Size Change: +5 B (+0.03%)

Total Size: 15.9 kB

📦 View Changed
Filename Size Change
hooks/dist/hooks.mjs 1.59 kB +5 B (+0.32%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.mjs 3.92 kB
debug/dist/debug.mjs 3.88 kB
devtools/dist/devtools.mjs 273 B
dist/preact.mjs 4.89 kB
jsx-runtime/dist/jsxRuntime.mjs 868 B
test-utils/dist/testUtils.mjs 473 B

compressed-size-action

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 99.856%. remained the same — perf/hooks-scu-scan-shortcut into main

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.

2 participants