Skip to content

Comments

refactor(diff): make oldProps diffing more compact#5004

Merged
JoviDeCroock merged 2 commits intopreactjs:mainfrom
ali-garajian:main
Feb 10, 2026
Merged

refactor(diff): make oldProps diffing more compact#5004
JoviDeCroock merged 2 commits intopreactjs:mainfrom
ali-garajian:main

Conversation

@ali-garajian
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

📊 Tachometer Benchmark Results

Summary

⏳ Benchmarks are currently running. Results below are out of date.

duration

  • create10k: unsure 🔍 -0% - +1% (-2.09ms - +6.14ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.07ms - +0.05ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +1% (-1.10ms - +0.66ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -2% - +3% (-0.31ms - +0.50ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +2% (-0.75ms - +0.90ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -8% - +4% (-0.16ms - +0.08ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +1% (-0.16ms - +0.36ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -5% - +3% (-1.43ms - +1.02ms)
    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 🔍 -7% - +5% (-0.51ms - +0.33ms)
    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 🔍 -2% - +3% (-0.02ms - +0.03ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -1% - +0% (-0.02ms - +0.00ms)
    preact-local vs preact-main

Results

⏳ Benchmarks are currently running. Results below are out of date.
create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local881.75ms - 887.53ms-unsure 🔍
-0% - +1%
-2.09ms - +6.14ms
preact-main879.69ms - 885.55msunsure 🔍
-1% - +0%
-6.14ms - +2.09ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.44ms - 16.51ms-unsure 🔍
-0% - +0%
-0.07ms - +0.05ms
preact-main16.43ms - 16.53msunsure 🔍
-0% - +0%
-0.05ms - +0.07ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local61.30ms - 62.59ms-unsure 🔍
-2% - +1%
-1.10ms - +0.66ms
preact-main61.58ms - 62.76msunsure 🔍
-1% - +2%
-0.66ms - +1.10ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local6.37ms - 6.97ms-unsure 🔍
-7% - +5%
-0.51ms - +0.33ms
preact-main6.47ms - 7.05msunsure 🔍
-5% - +8%
-0.33ms - +0.51ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.25ms - 16.90ms-unsure 🔍
-2% - +3%
-0.31ms - +0.50ms
preact-main16.24ms - 16.71msunsure 🔍
-3% - +2%
-0.50ms - +0.31ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local56.73ms - 57.92ms-unsure 🔍
-1% - +2%
-0.75ms - +0.90ms
preact-main56.68ms - 57.83msunsure 🔍
-2% - +1%
-0.90ms - +0.75ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.99ms - 2.99ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main2.99ms - 2.99msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local25.16ms - 25.96ms-unsure 🔍
-1% - +4%
-0.14ms - +0.91ms
preact-main24.83ms - 25.52msunsure 🔍
-4% - +1%
-0.91ms - +0.14ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local31.56ms - 32.61ms-unsure 🔍
-2% - +2%
-0.60ms - +0.80ms
preact-main31.52ms - 32.45msunsure 🔍
-2% - +2%
-0.80ms - +0.60ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local32.71ms - 33.53ms-unsure 🔍
-2% - +2%
-0.57ms - +0.59ms
preact-main32.71ms - 33.52msunsure 🔍
-2% - +2%
-0.59ms - +0.57ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local25.91ms - 26.21ms-unsure 🔍
-1% - +1%
-0.13ms - +0.33ms
preact-main25.79ms - 26.14msunsure 🔍
-1% - +1%
-0.33ms - +0.13ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local24.61ms - 26.01ms-unsure 🔍
-6% - +1%
-1.65ms - +0.40ms
preact-main25.19ms - 26.69msunsure 🔍
-2% - +7%
-0.40ms - +1.65ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local21.31ms - 21.82ms-unsure 🔍
-2% - +1%
-0.43ms - +0.32ms
preact-main21.35ms - 21.89msunsure 🔍
-1% - +2%
-0.32ms - +0.43ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 240
  • Built by: CI #5345
  • Commit: 59593d2

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.91ms - 2.07ms-unsure 🔍
-8% - +4%
-0.16ms - +0.08ms
preact-main1.93ms - 2.11msunsure 🔍
-4% - +8%
-0.08ms - +0.16ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local0.99ms - 1.03ms-unsure 🔍
-2% - +3%
-0.02ms - +0.03ms
preact-main0.99ms - 1.02msunsure 🔍
-3% - +1%
-0.03ms - +0.02ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local30.54ms - 30.82ms-unsure 🔍
-1% - +1%
-0.16ms - +0.36ms
preact-main30.37ms - 30.81msunsure 🔍
-1% - +1%
-0.36ms - +0.16ms
-

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-local29.49ms - 31.52ms-unsure 🔍
-5% - +3%
-1.43ms - +1.02ms
preact-main30.03ms - 31.40msunsure 🔍
-3% - +5%
-1.02ms - +1.43ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.94ms - 2.95ms-unsure 🔍
-1% - +0%
-0.02ms - +0.00ms
preact-main2.95ms - 2.96msunsure 🔍
-0% - +1%
-0.00ms - +0.02ms
-

tachometer-reporter-action v2 for CI

@coveralls
Copy link

coveralls commented Jan 27, 2026

Coverage Status

coverage: 99.538%. remained the same
when pulling 5a83fd7 on ali-garajian:main
into fbb6a4e on preactjs:main.

@ali-garajian ali-garajian force-pushed the main branch 2 times, most recently from f40dd92 to be333ec Compare January 27, 2026 16:58
@ali-garajian
Copy link
Contributor Author

@rschristian Hey there, hope you're well.
Do you by any chance have time to review this?

@rschristian
Copy link
Member

rschristian commented Feb 9, 2026

Nice diff tho:

Size Change: -40 B (-0.08%)

Total Size: 47.6 kB

Filename Size Change
dist/preact.js 4.69 kB -14 B (-0.3%)
dist/preact.mjs 4.7 kB -13 B (-0.28%)
dist/preact.umd.js 4.75 kB -13 B (-0.27%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 3.95 kB
compat/dist/compat.mjs 3.88 kB
compat/dist/compat.umd.js 4 kB
debug/dist/debug.js 3.91 kB
debug/dist/debug.mjs 3.91 kB
debug/dist/debug.umd.js 3.99 kB
devtools/dist/devtools.js 263 B
devtools/dist/devtools.mjs 273 B
devtools/dist/devtools.umd.js 348 B
hooks/dist/hooks.js 1.53 kB
hooks/dist/hooks.mjs 1.56 kB
hooks/dist/hooks.umd.js 1.6 kB
jsx-runtime/dist/jsxRuntime.js 892 B
jsx-runtime/dist/jsxRuntime.mjs 861 B
jsx-runtime/dist/jsxRuntime.umd.js 966 B
test-utils/dist/testUtils.js 473 B
test-utils/dist/testUtils.mjs 473 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

@rschristian
Copy link
Member

You'll just need to rebase

@ali-garajian
Copy link
Contributor Author

@rschristian rebased

@JoviDeCroock JoviDeCroock merged commit 477c8c4 into preactjs:main Feb 10, 2026
13 checks passed
JoviDeCroock pushed a commit that referenced this pull request Feb 12, 2026
* refactor(diff): make oldProps diffing more compact

* test(render): check if children is being set on rerenders

---------

Co-authored-by: Ali Garajian <[email protected]>
@JoviDeCroock JoviDeCroock mentioned this pull request Feb 18, 2026
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