Skip to content

Implement flushSync#5036

Merged
JoviDeCroock merged 1 commit intov10.xfrom
flush-sync-impl
Feb 24, 2026
Merged

Implement flushSync#5036
JoviDeCroock merged 1 commit intov10.xfrom
flush-sync-impl

Conversation

@JoviDeCroock
Copy link
Member

Relates to mui/base-ui#4127
Resolves #3929
implements flushSync from #5025

@github-actions
Copy link

github-actions bot commented Feb 24, 2026

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -1% - +0% (-4.55ms - +4.49ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.03ms - +0.02ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +2% (-0.75ms - +1.05ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -2% - +0% (-0.38ms - +0.06ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -2% - +2% (-1.25ms - +1.01ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -7% - +0% (-0.14ms - +0.00ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -2% - +0% (-0.55ms - +0.06ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -4% - +2% (-1.53ms - +0.81ms)
    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 🔍 -1% - +7% (-0.16ms - +0.85ms)
    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 🔍 -3% - +4% (-0.03ms - +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.01ms - +0.01ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local897.29ms - 903.82ms-unsure 🔍
-1% - +0%
-4.55ms - +4.49ms
preact-main897.45ms - 903.72msunsure 🔍
-0% - +1%
-4.49ms - +4.55ms
-

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.51ms - 16.55ms-unsure 🔍
-0% - +0%
-0.03ms - +0.02ms
preact-main16.52ms - 16.56msunsure 🔍
-0% - +0%
-0.02ms - +0.03ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local61.51ms - 62.64ms-unsure 🔍
-1% - +2%
-0.75ms - +1.05ms
preact-main61.22ms - 62.62msunsure 🔍
-2% - +1%
-1.05ms - +0.75ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local11.46ms - 12.18ms-unsure 🔍
-1% - +7%
-0.16ms - +0.85ms
preact-main11.13ms - 11.83msunsure 🔍
-7% - +1%
-0.85ms - +0.16ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.35ms - 16.61ms-unsure 🔍
-2% - +0%
-0.38ms - +0.06ms
preact-main16.46ms - 16.81msunsure 🔍
-0% - +2%
-0.06ms - +0.38ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local62.35ms - 63.98ms-unsure 🔍
-2% - +2%
-1.25ms - +1.01ms
preact-main62.50ms - 64.07msunsure 🔍
-2% - +2%
-1.01ms - +1.25ms
-

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.74ms - 27.91ms-unsure 🔍
-4% - +1%
-1.13ms - +0.38ms
preact-main27.22ms - 28.18msunsure 🔍
-1% - +4%
-0.38ms - +1.13ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local33.35ms - 34.72ms-unsure 🔍
-4% - +2%
-1.31ms - +0.69ms
preact-main33.61ms - 35.07msunsure 🔍
-2% - +4%
-0.69ms - +1.31ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local34.07ms - 35.49ms-unsure 🔍
-3% - +3%
-1.09ms - +0.92ms
preact-main34.15ms - 35.58msunsure 🔍
-3% - +3%
-0.92ms - +1.09ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local27.74ms - 28.24ms-unsure 🔍
-0% - +3%
-0.09ms - +0.76ms
preact-main27.31ms - 28.00msunsure 🔍
-3% - +0%
-0.76ms - +0.09ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local24.97ms - 26.43ms-unsure 🔍
-3% - +6%
-0.66ms - +1.40ms
preact-main24.60ms - 26.05msunsure 🔍
-5% - +3%
-1.40ms - +0.66ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local22.83ms - 23.30ms-unsure 🔍
-3% - +0%
-0.63ms - +0.11ms
preact-main23.04ms - 23.61msunsure 🔍
-0% - +3%
-0.11ms - +0.63ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 240
  • Built by: CI #5405
  • Commit: 9c59a42

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.77ms - 1.85ms-unsure 🔍
-7% - +0%
-0.14ms - +0.00ms
preact-main1.82ms - 1.93msunsure 🔍
-0% - +8%
-0.00ms - +0.14ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.00ms - 1.05ms-unsure 🔍
-3% - +4%
-0.03ms - +0.04ms
preact-main1.00ms - 1.05msunsure 🔍
-4% - +3%
-0.04ms - +0.03ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.00ms - 33.26ms-unsure 🔍
-2% - +0%
-0.55ms - +0.06ms
preact-main33.10ms - 33.66msunsure 🔍
-0% - +2%
-0.06ms - +0.55ms
-

usedJSHeapSize

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

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.92ms - 35.47ms-unsure 🔍
-4% - +2%
-1.53ms - +0.81ms
preact-main34.18ms - 35.93msunsure 🔍
-2% - +4%
-0.81ms - +1.53ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.96ms - 2.98ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-main2.97ms - 2.98msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-

tachometer-reporter-action v2 for CI

@github-actions
Copy link

Size Change: +149 B (+0.19%)

Total Size: 78.9 kB

Filename Size Change
compat/dist/compat.js 4.22 kB +39 B (+0.93%)
compat/dist/compat.mjs 4.14 kB +36 B (+0.88%)
compat/dist/compat.module.js 4.14 kB +36 B (+0.88%)
compat/dist/compat.umd.js 4.29 kB +38 B (+0.89%)
ℹ️ View Unchanged
Filename Size
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
dist/preact.js 4.72 kB
dist/preact.min.js 4.73 kB
dist/preact.min.module.js 4.74 kB
dist/preact.min.umd.js 4.75 kB
dist/preact.mjs 4.73 kB
dist/preact.module.js 4.73 kB
dist/preact.umd.js 4.76 kB
hooks/dist/hooks.js 1.52 kB
hooks/dist/hooks.mjs 1.56 kB
hooks/dist/hooks.module.js 1.56 kB
hooks/dist/hooks.umd.js 1.59 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

@JoviDeCroock JoviDeCroock merged commit 978c0b9 into v10.x Feb 24, 2026
14 checks passed
@JoviDeCroock JoviDeCroock deleted the flush-sync-impl branch February 24, 2026 17:58
@JoviDeCroock JoviDeCroock mentioned this pull request Mar 10, 2026
JoviDeCroock added a commit that referenced this pull request Mar 10, 2026
(cherry picked from commit 978c0b9)
JoviDeCroock added a commit that referenced this pull request Mar 15, 2026
* Fix crash where a synchronous effect render unmounts the tree (#5026)

(cherry picked from commit 8cbed5f)

* Golf down compat (#5025)

* Make useFlushSync do sync flushes

* Golf bytes to offset change

* Some more golfing

* Revert "Make useFlushSync do sync flushes"

This reverts commit 001bbce.

(cherry picked from commit af4c459)

* Implement flushSync (#5036)

(cherry picked from commit 978c0b9)

* undefined prototype (#5041)

* undefined prototype

* Add test

(cherry picked from commit b341bfe)

* Ensure we reset renderCount (#5017)

* Golf some bytes and ensure we reset renderCount

* Apply suggestion from @JoviDeCroock

* Add test

(cherry picked from commit 55254ef)

* fix(compat): export StrictMode directly
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