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

WIP: batch commit callbacks from all components in the render queue #4234

Merged
merged 8 commits into from
Jan 5, 2024

Conversation

developit
Copy link
Member

Still one failing test, and we'll want to decide how best to alter the semantics of options._commit. Right now I have it attempting to emulate the old calling order, so _commit(vnode) gets called for every component with a dummy queue.

Copy link

github-actions bot commented Dec 18, 2023

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -1% - +2% (-0.69ms - +1.78ms)
    preact-local vs preact-main
  • 03_update10th1k_x16: unsure 🔍 -2% - +5% (-0.72ms - +1.61ms)
    preact-local vs preact-main
  • 07_create10k: unsure 🔍 -1% - +1% (-10.41ms - +6.25ms)
    preact-local vs preact-main
  • filter_list: unsure 🔍 -1% - +1% (-0.24ms - +0.12ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +2% (-1.28ms - +1.42ms)
    preact-local vs preact-main
  • many_updates: unsure 🔍 -1% - +3% (-0.25ms - +0.47ms)
    preact-local vs preact-main
  • text_update: unsure 🔍 -2% - +5% (-0.06ms - +0.13ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +1% (-0.18ms - +0.16ms)
    preact-local vs preact-main

usedJSHeapSize

  • 02_replace1k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • 03_update10th1k_x16: unsure 🔍 -0% - +0% (-0.00ms - +0.01ms)
    preact-local vs preact-main
  • 07_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 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • many_updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • text_update: unsure 🔍 -1% - +2% (-0.01ms - +0.01ms)
    preact-local vs preact-main
  • todo: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main

Results

02_replace1k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main83.34ms - 84.83ms-unsure 🔍
-2% - +1%
-1.78ms - +0.69ms
unsure 🔍
-1% - +1%
-1.22ms - +0.53ms
preact-local83.65ms - 85.61msunsure 🔍
-1% - +2%
-0.69ms - +1.78ms
-unsure 🔍
-1% - +2%
-0.88ms - +1.28ms
preact-hooks83.97ms - 84.89msunsure 🔍
-1% - +1%
-0.53ms - +1.22ms
unsure 🔍
-2% - +1%
-1.28ms - +0.88ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.32ms - 3.32ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
1% - 1%
0.02ms - 0.03ms
preact-local3.32ms - 3.32msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
1% - 1%
0.02ms - 0.03ms
preact-hooks3.34ms - 3.34msslower ❌
1% - 1%
0.02ms - 0.03ms
slower ❌
1% - 1%
0.02ms - 0.03ms
-

run-warmup-0

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main31.55ms - 32.65ms-unsure 🔍
-2% - +3%
-0.50ms - +1.10ms
unsure 🔍
-1% - +3%
-0.36ms - +1.10ms
preact-local31.22ms - 32.38msunsure 🔍
-3% - +2%
-1.10ms - +0.50ms
-unsure 🔍
-2% - +3%
-0.69ms - +0.81ms
preact-hooks31.26ms - 32.21msunsure 🔍
-3% - +1%
-1.10ms - +0.36ms
unsure 🔍
-3% - +2%
-0.81ms - +0.69ms
-

run-warmup-1

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main38.34ms - 39.88ms-unsure 🔍
-5% - +0%
-2.07ms - +0.05ms
faster ✔
1% - 5%
0.23ms - 2.09ms
preact-local39.39ms - 40.85msunsure 🔍
-0% - +5%
-0.05ms - +2.07ms
-unsure 🔍
-3% - +2%
-1.04ms - +0.74ms
preact-hooks39.76ms - 40.78msslower ❌
1% - 5%
0.23ms - 2.09ms
unsure 🔍
-2% - +3%
-0.74ms - +1.04ms
-

run-warmup-2

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main29.46ms - 29.92ms-unsure 🔍
-1% - +1%
-0.37ms - +0.29ms
faster ✔
0% - 2%
0.11ms - 0.67ms
preact-local29.49ms - 29.97msunsure 🔍
-1% - +1%
-0.29ms - +0.37ms
-faster ✔
0% - 2%
0.06ms - 0.63ms
preact-hooks29.92ms - 30.24msslower ❌
0% - 2%
0.11ms - 0.67ms
slower ❌
0% - 2%
0.06ms - 0.63ms
-

run-warmup-3

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main23.31ms - 23.51ms-unsure 🔍
-0% - +1%
-0.08ms - +0.22ms
faster ✔
0% - 2%
0.11ms - 0.41ms
preact-local23.23ms - 23.45msunsure 🔍
-1% - +0%
-0.22ms - +0.08ms
-faster ✔
1% - 2%
0.18ms - 0.49ms
preact-hooks23.56ms - 23.78msslower ❌
0% - 2%
0.11ms - 0.41ms
slower ❌
1% - 2%
0.18ms - 0.49ms
-

run-warmup-4

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main38.11ms - 39.69ms-unsure 🔍
-3% - +3%
-1.08ms - +1.00ms
faster ✔
0% - 5%
0.09ms - 1.81ms
preact-local38.26ms - 39.62msunsure 🔍
-3% - +3%
-1.00ms - +1.08ms
-faster ✔
0% - 4%
0.15ms - 1.67ms
preact-hooks39.52ms - 40.18msslower ❌
0% - 5%
0.09ms - 1.81ms
slower ❌
0% - 4%
0.15ms - 1.67ms
-

run-final

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main22.44ms - 22.92ms-unsure 🔍
-3% - +1%
-0.68ms - +0.22ms
unsure 🔍
-3% - +0%
-0.68ms - +0.02ms
preact-local22.53ms - 23.29msunsure 🔍
-1% - +3%
-0.22ms - +0.68ms
-unsure 🔍
-2% - +2%
-0.56ms - +0.36ms
preact-hooks22.76ms - 23.27msunsure 🔍
-0% - +3%
-0.02ms - +0.68ms
unsure 🔍
-2% - +2%
-0.36ms - +0.56ms
-
03_update10th1k_x16

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main29.57ms - 31.20ms-unsure 🔍
-5% - +2%
-1.61ms - +0.72ms
unsure 🔍
-5% - +2%
-1.66ms - +0.61ms
preact-local30.00ms - 31.66msunsure 🔍
-2% - +5%
-0.72ms - +1.61ms
-unsure 🔍
-4% - +3%
-1.23ms - +1.06ms
preact-hooks30.12ms - 31.70msunsure 🔍
-2% - +6%
-0.61ms - +1.66ms
unsure 🔍
-3% - +4%
-1.06ms - +1.23ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.28ms - 3.29ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
faster ✔
0% - 1%
0.02ms - 0.03ms
preact-local3.28ms - 3.29msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-faster ✔
0% - 1%
0.01ms - 0.02ms
preact-hooks3.30ms - 3.31msslower ❌
0% - 1%
0.02ms - 0.03ms
slower ❌
0% - 1%
0.01ms - 0.02ms
-
07_create10k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main917.23ms - 929.74ms-unsure 🔍
-1% - +1%
-6.25ms - +10.41ms
unsure 🔍
-1% - +1%
-8.74ms - +7.32ms
preact-local915.90ms - 926.91msunsure 🔍
-1% - +1%
-10.41ms - +6.25ms
-unsure 🔍
-1% - +1%
-10.25ms - +4.67ms
preact-hooks919.16ms - 929.24msunsure 🔍
-1% - +1%
-7.32ms - +8.74ms
unsure 🔍
-1% - +1%
-4.67ms - +10.25ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main26.32ms - 26.32ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-local26.32ms - 26.32msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-hooks26.34ms - 26.34msunsure 🔍
+0% - +0%
+0.02ms - +0.02ms
unsure 🔍
+0% - +0%
+0.02ms - +0.02ms
-
filter_list

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main16.58ms - 16.92ms-unsure 🔍
-1% - +1%
-0.12ms - +0.24ms
unsure 🔍
-1% - +2%
-0.10ms - +0.26ms
preact-local16.64ms - 16.74msunsure 🔍
-1% - +1%
-0.24ms - +0.12ms
-unsure 🔍
-0% - +1%
-0.05ms - +0.10ms
preact-hooks16.61ms - 16.72msunsure 🔍
-2% - +1%
-0.26ms - +0.10ms
unsure 🔍
-1% - +0%
-0.10ms - +0.05ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main1.33ms - 1.33ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
2% - 2%
0.02ms - 0.03ms
preact-local1.33ms - 1.34msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
2% - 2%
0.02ms - 0.03ms
preact-hooks1.36ms - 1.36msslower ❌
2% - 2%
0.02ms - 0.03ms
slower ❌
2% - 2%
0.02ms - 0.03ms
-
hydrate1k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main84.03ms - 85.39ms-unsure 🔍
-2% - +2%
-1.42ms - +1.28ms
unsure 🔍
-2% - +1%
-1.52ms - +0.96ms
preact-local83.61ms - 85.94msunsure 🔍
-2% - +2%
-1.28ms - +1.42ms
-unsure 🔍
-2% - +2%
-1.78ms - +1.35ms
preact-hooks83.95ms - 86.03msunsure 🔍
-1% - +2%
-0.96ms - +1.52ms
unsure 🔍
-2% - +2%
-1.35ms - +1.78ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main6.10ms - 6.10ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-local6.10ms - 6.10msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-hooks6.12ms - 6.12msunsure 🔍
+0% - +0%
+0.02ms - +0.02ms
unsure 🔍
+0% - +0%
+0.02ms - +0.02ms
-
many_updates

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main18.37ms - 18.80ms-unsure 🔍
-2% - +1%
-0.47ms - +0.25ms
unsure 🔍
-3% - +1%
-0.48ms - +0.10ms
preact-local18.41ms - 18.98msunsure 🔍
-1% - +3%
-0.25ms - +0.47ms
-unsure 🔍
-2% - +1%
-0.43ms - +0.26ms
preact-hooks18.58ms - 18.98msunsure 🔍
-1% - +3%
-0.10ms - +0.48ms
unsure 🔍
-1% - +2%
-0.26ms - +0.43ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main4.44ms - 4.44ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-local4.44ms - 4.44msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-hooks4.46ms - 4.46msunsure 🔍
+0% - +0%
+0.02ms - +0.02ms
unsure 🔍
+0% - +0%
+0.02ms - +0.02ms
-
text_update

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main2.54ms - 2.66ms-unsure 🔍
-5% - +2%
-0.13ms - +0.06ms
faster ✔
6% - 14%
0.18ms - 0.40ms
preact-local2.56ms - 2.70msunsure 🔍
-2% - +5%
-0.06ms - +0.13ms
-faster ✔
5% - 13%
0.14ms - 0.37ms
preact-hooks2.80ms - 2.98msslower ❌
7% - 15%
0.18ms - 0.40ms
slower ❌
5% - 14%
0.14ms - 0.37ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main0.56ms - 0.57ms-unsure 🔍
-2% - +1%
-0.01ms - +0.01ms
faster ✔
2% - 4%
0.01ms - 0.03ms
preact-local0.56ms - 0.57msunsure 🔍
-1% - +2%
-0.01ms - +0.01ms
-faster ✔
2% - 4%
0.01ms - 0.02ms
preact-hooks0.59ms - 0.59msslower ❌
2% - 4%
0.01ms - 0.03ms
slower ❌
2% - 4%
0.01ms - 0.02ms
-
todo

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main26.93ms - 27.16ms-unsure 🔍
-1% - +1%
-0.16ms - +0.18ms
faster ✔
2% - 5%
0.56ms - 1.28ms
preact-local26.91ms - 27.15msunsure 🔍
-1% - +1%
-0.18ms - +0.16ms
-faster ✔
2% - 5%
0.57ms - 1.29ms
preact-hooks27.62ms - 28.30msslower ❌
2% - 5%
0.56ms - 1.28ms
slower ❌
2% - 5%
0.57ms - 1.29ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main0.79ms - 0.79ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
faster ✔
3% - 3%
0.03ms - 0.03ms
preact-local0.79ms - 0.79msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-faster ✔
3% - 3%
0.03ms - 0.03ms
preact-hooks0.82ms - 0.82msslower ❌
3% - 3%
0.03ms - 0.03ms
slower ❌
3% - 3%
0.03ms - 0.03ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link

github-actions bot commented Dec 18, 2023

Size Change: +184 B (0%)

Total Size: 60 kB

Filename Size Change
dist/preact.js 4.54 kB +30 B (0%)
dist/preact.min.js 4.58 kB +31 B (0%)
dist/preact.min.module.js 4.57 kB +31 B (0%)
dist/preact.min.umd.js 4.6 kB +31 B (0%)
dist/preact.module.js 4.56 kB +33 B (0%)
dist/preact.umd.js 4.62 kB +28 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.98 kB 0 B
compat/dist/compat.module.js 3.9 kB 0 B
compat/dist/compat.umd.js 4.04 kB 0 B
debug/dist/debug.js 3.52 kB 0 B
debug/dist/debug.module.js 3.52 kB 0 B
debug/dist/debug.umd.js 3.6 kB 0 B
devtools/dist/devtools.js 232 B 0 B
devtools/dist/devtools.module.js 240 B 0 B
devtools/dist/devtools.umd.js 315 B 0 B
hooks/dist/hooks.js 1.55 kB 0 B
hooks/dist/hooks.module.js 1.59 kB 0 B
hooks/dist/hooks.umd.js 1.63 kB 0 B
jsx-runtime/dist/jsxRuntime.js 963 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 938 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 1.04 kB 0 B
test-utils/dist/testUtils.js 453 B 0 B
test-utils/dist/testUtils.module.js 454 B 0 B
test-utils/dist/testUtils.umd.js 536 B 0 B

compressed-size-action

@coveralls
Copy link

coveralls commented Dec 18, 2023

Coverage Status

coverage: 99.472% (+0.004%) from 99.468%
when pulling b09f4c1 on multi-root-shared-commit
into e1f0d3e on main.

src/component.js Outdated Show resolved Hide resolved
developit and others added 2 commits January 2, 2024 11:10
Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
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.

Let's remove the commented out code, then it's good to land.

src/component.js Outdated Show resolved Hide resolved
src/render.js Outdated Show resolved Hide resolved
compat/test/browser/useSyncExternalStore.test.js Outdated Show resolved Hide resolved
@developit developit merged commit f7ccb90 into main Jan 5, 2024
13 checks passed
@developit developit deleted the multi-root-shared-commit branch January 5, 2024 16:30
@JoviDeCroock JoviDeCroock mentioned this pull request Feb 3, 2024
JoviDeCroock added a commit that referenced this pull request Mar 2, 2024
JoviDeCroock added a commit that referenced this pull request Mar 17, 2024
…it" (#4297)

This reverts commit f7ccb90, reversing
changes made to e1f0d3e.
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