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

fix: invalid vnode id for text nodes #4291

Merged
merged 1 commit into from Feb 22, 2024
Merged

Conversation

marvinhagemeister
Copy link
Member

Materialized text vnodes would pass their content as the original vnode id which is wrong and turns the vnode id into a string. The vnode id is expected to be a number instead though.

This had no effect on correctness or anything, just an unnecessary type conversion.

Copy link

github-actions bot commented Feb 22, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: slower ❌ 1% - 6% (0.68ms - 4.65ms)
    preact-local vs preact-main
  • 03_update10th1k_x16: slower ❌ 11% - 19% (3.52ms - 5.44ms)
    preact-local vs preact-main
  • 07_create10k: unsure 🔍 -1% - +2% (-6.23ms - +17.98ms)
    preact-local vs preact-main
  • filter_list: unsure 🔍 -1% - +0% (-0.12ms - +0.05ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +2% (-1.32ms - +1.74ms)
    preact-local vs preact-main
  • many_updates: unsure 🔍 -3% - +3% (-0.46ms - +0.46ms)
    preact-local vs preact-main
  • text_update: unsure 🔍 -4% - +4% (-0.10ms - +0.10ms)
    preact-local vs preact-main
  • todo: slower ❌ 2% - 6% (0.41ms - 1.60ms)
    preact-local vs preact-main

usedJSHeapSize

  • 02_replace1k: unsure 🔍 +0% - +0% (+0.00ms - +0.01ms)
    preact-local vs preact-main
  • 03_update10th1k_x16: slower ❌ 0% - 1% (0.02ms - 0.03ms)
    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.01ms - +0.01ms)
    preact-local vs preact-main
  • many_updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • text_update: unsure 🔍 -0% - -0% (-0.00ms - -0.00ms)
    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-main80.14ms - 82.11ms-faster ✔
1% - 5%
0.68ms - 4.65ms
unsure 🔍
-3% - +1%
-2.80ms - +0.48ms
preact-local82.07ms - 85.52msslower ❌
1% - 6%
0.68ms - 4.65ms
-unsure 🔍
-1% - +4%
-0.66ms - +3.67ms
preact-hooks80.98ms - 83.60msunsure 🔍
-1% - +3%
-0.48ms - +2.80ms
unsure 🔍
-4% - +1%
-3.67ms - +0.66ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.48ms - 3.48ms-unsure 🔍
-0% - -0%
-0.01ms - -0.00ms
faster ✔
1% - 1%
0.02ms - 0.03ms
preact-local3.48ms - 3.49msunsure 🔍
+0% - +0%
+0.00ms - +0.01ms
-faster ✔
0% - 1%
0.02ms - 0.02ms
preact-hooks3.50ms - 3.50msslower ❌
1% - 1%
0.02ms - 0.03ms
slower ❌
0% - 1%
0.02ms - 0.02ms
-

run-warmup-0

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main30.96ms - 31.91ms-unsure 🔍
-1% - +3%
-0.18ms - +1.01ms
unsure 🔍
-4% - +1%
-1.43ms - +0.19ms
preact-local30.67ms - 31.38msunsure 🔍
-3% - +1%
-1.01ms - +0.18ms
-faster ✔
1% - 6%
0.29ms - 1.78ms
preact-hooks31.41ms - 32.72msunsure 🔍
-1% - +5%
-0.19ms - +1.43ms
slower ❌
1% - 6%
0.29ms - 1.78ms
-

run-warmup-1

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main39.77ms - 41.42ms-unsure 🔍
-5% - +1%
-1.90ms - +0.26ms
faster ✔
3% - 7%
1.06ms - 3.08ms
preact-local40.72ms - 42.11msunsure 🔍
-1% - +5%
-0.26ms - +1.90ms
-faster ✔
1% - 5%
0.35ms - 2.15ms
preact-hooks42.09ms - 43.24msslower ❌
3% - 8%
1.06ms - 3.08ms
slower ❌
1% - 5%
0.35ms - 2.15ms
-

run-warmup-2

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main27.63ms - 28.12ms-unsure 🔍
-2% - +1%
-0.60ms - +0.27ms
unsure 🔍
-1% - +1%
-0.41ms - +0.24ms
preact-local27.68ms - 28.40msunsure 🔍
-1% - +2%
-0.27ms - +0.60ms
-unsure 🔍
-1% - +2%
-0.34ms - +0.51ms
preact-hooks27.73ms - 28.18msunsure 🔍
-1% - +1%
-0.24ms - +0.41ms
unsure 🔍
-2% - +1%
-0.51ms - +0.34ms
-

run-warmup-3

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main26.01ms - 27.20ms-unsure 🔍
-5% - +2%
-1.29ms - +0.47ms
unsure 🔍
-3% - +3%
-0.92ms - +0.86ms
preact-local26.37ms - 27.67msunsure 🔍
-2% - +5%
-0.47ms - +1.29ms
-unsure 🔍
-2% - +5%
-0.54ms - +1.30ms
preact-hooks25.98ms - 27.29msunsure 🔍
-3% - +3%
-0.86ms - +0.92ms
unsure 🔍
-5% - +2%
-1.30ms - +0.54ms
-

run-warmup-4

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main28.85ms - 30.67ms-unsure 🔍
-2% - +7%
-0.63ms - +2.01ms
unsure 🔍
-7% - +0%
-2.14ms - +0.16ms
preact-local28.11ms - 30.02msunsure 🔍
-7% - +2%
-2.01ms - +0.63ms
-faster ✔
2% - 9%
0.51ms - 2.86ms
preact-hooks30.06ms - 31.45msunsure 🔍
-1% - +7%
-0.16ms - +2.14ms
slower ❌
2% - 10%
0.51ms - 2.86ms
-

run-final

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main22.93ms - 23.97ms-unsure 🔍
-8% - +1%
-1.92ms - +0.17ms
unsure 🔍
-5% - +1%
-1.28ms - +0.20ms
preact-local23.42ms - 25.23msunsure 🔍
-1% - +8%
-0.17ms - +1.92ms
-unsure 🔍
-3% - +6%
-0.70ms - +1.38ms
preact-hooks23.47ms - 24.51msunsure 🔍
-1% - +5%
-0.20ms - +1.28ms
unsure 🔍
-6% - +3%
-1.38ms - +0.70ms
-
03_update10th1k_x16

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main29.08ms - 30.67ms-faster ✔
10% - 16%
3.52ms - 5.44ms
faster ✔
7% - 12%
2.17ms - 4.13ms
preact-local33.82ms - 34.90msslower ❌
11% - 19%
3.52ms - 5.44ms
-slower ❌
2% - 6%
0.55ms - 2.11ms
preact-hooks32.46ms - 33.59msslower ❌
7% - 14%
2.17ms - 4.13ms
faster ✔
2% - 6%
0.55ms - 2.11ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main3.43ms - 3.44ms-faster ✔
0% - 1%
0.02ms - 0.03ms
faster ✔
1% - 1%
0.03ms - 0.04ms
preact-local3.45ms - 3.46msslower ❌
0% - 1%
0.02ms - 0.03ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.01ms
preact-hooks3.47ms - 3.47msslower ❌
1% - 1%
0.03ms - 0.04ms
unsure 🔍
+0% - +0%
+0.01ms - +0.02ms
-
07_create10k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main930.00ms - 939.26ms-unsure 🔍
-2% - +1%
-17.98ms - +6.23ms
unsure 🔍
-1% - +1%
-6.87ms - +7.33ms
preact-local929.32ms - 951.69msunsure 🔍
-1% - +2%
-6.23ms - +17.98ms
-unsure 🔍
-1% - +2%
-6.31ms - +18.52ms
preact-hooks929.01ms - 939.79msunsure 🔍
-1% - +1%
-7.33ms - +6.87ms
unsure 🔍
-2% - +1%
-18.52ms - +6.31ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main26.48ms - 26.48ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-local26.48ms - 26.48msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-unsure 🔍
-0% - -0%
-0.02ms - -0.02ms
preact-hooks26.50ms - 26.50msunsure 🔍
+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.64ms - 16.77ms-unsure 🔍
-0% - +1%
-0.05ms - +0.12ms
unsure 🔍
-0% - +1%
-0.05ms - +0.13ms
preact-local16.61ms - 16.73msunsure 🔍
-1% - +0%
-0.12ms - +0.05ms
-unsure 🔍
-1% - +1%
-0.09ms - +0.09ms
preact-hooks16.60ms - 16.73msunsure 🔍
-1% - +0%
-0.13ms - +0.05ms
unsure 🔍
-1% - +1%
-0.09ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main1.49ms - 1.49ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
2% - 2%
0.02ms - 0.03ms
preact-local1.49ms - 1.49msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
2% - 2%
0.02ms - 0.03ms
preact-hooks1.52ms - 1.52msslower ❌
2% - 2%
0.02ms - 0.03ms
slower ❌
2% - 2%
0.02ms - 0.03ms
-
hydrate1k

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main75.84ms - 77.44ms-unsure 🔍
-2% - +2%
-1.74ms - +1.32ms
unsure 🔍
-1% - +2%
-0.45ms - +1.20ms
preact-local75.55ms - 78.15msunsure 🔍
-2% - +2%
-1.32ms - +1.74ms
-unsure 🔍
-1% - +2%
-0.73ms - +1.90ms
preact-hooks76.06ms - 76.46msunsure 🔍
-2% - +1%
-1.20ms - +0.45ms
unsure 🔍
-2% - +1%
-1.90ms - +0.73ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main6.18ms - 6.19ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
unsure 🔍
-0% - -0%
-0.03ms - -0.01ms
preact-local6.18ms - 6.18msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-unsure 🔍
-0% - -0%
-0.03ms - -0.02ms
preact-hooks6.20ms - 6.20msunsure 🔍
+0% - +0%
+0.01ms - +0.03ms
unsure 🔍
+0% - +0%
+0.02ms - +0.03ms
-
many_updates

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main16.50ms - 17.20ms-unsure 🔍
-3% - +3%
-0.46ms - +0.46ms
unsure 🔍
-3% - +2%
-0.43ms - +0.38ms
preact-local16.56ms - 17.15msunsure 🔍
-3% - +3%
-0.46ms - +0.46ms
-unsure 🔍
-2% - +2%
-0.38ms - +0.34ms
preact-hooks16.67ms - 17.08msunsure 🔍
-2% - +3%
-0.38ms - +0.43ms
unsure 🔍
-2% - +2%
-0.34ms - +0.38ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main4.60ms - 4.60ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
faster ✔
0% - 1%
0.02ms - 0.03ms
preact-local4.60ms - 4.60msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-faster ✔
0% - 1%
0.02ms - 0.03ms
preact-hooks4.62ms - 4.63msslower ❌
0% - 1%
0.02ms - 0.03ms
slower ❌
0% - 1%
0.02ms - 0.03ms
-
text_update

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main2.36ms - 2.50ms-unsure 🔍
-4% - +4%
-0.10ms - +0.10ms
faster ✔
7% - 28%
0.13ms - 0.90ms
preact-local2.36ms - 2.51msunsure 🔍
-4% - +4%
-0.10ms - +0.10ms
-faster ✔
7% - 28%
0.13ms - 0.90ms
preact-hooks2.57ms - 3.33msslower ❌
5% - 37%
0.13ms - 0.90ms
slower ❌
5% - 37%
0.13ms - 0.90ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main0.72ms - 0.72ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
faster ✔
3% - 3%
0.02ms - 0.02ms
preact-local0.72ms - 0.72msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-faster ✔
3% - 3%
0.02ms - 0.02ms
preact-hooks0.75ms - 0.75msslower ❌
3% - 3%
0.02ms - 0.02ms
slower ❌
3% - 3%
0.02ms - 0.02ms
-
todo

duration

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main26.01ms - 26.26ms-faster ✔
2% - 6%
0.41ms - 1.60ms
faster ✔
4% - 6%
1.06ms - 1.68ms
preact-local26.56ms - 27.72msslower ❌
2% - 6%
0.41ms - 1.60ms
-unsure 🔍
-4% - +1%
-1.01ms - +0.28ms
preact-hooks27.22ms - 27.79msslower ❌
4% - 6%
1.06ms - 1.68ms
unsure 🔍
-1% - +4%
-0.28ms - +1.01ms
-

usedJSHeapSize

VersionAvg timevs preact-mainvs preact-localvs preact-hooks
preact-main0.95ms - 0.95ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
faster ✔
3% - 3%
0.03ms - 0.03ms
preact-local0.95ms - 0.95msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-faster ✔
3% - 3%
0.03ms - 0.03ms
preact-hooks0.98ms - 0.98msslower ❌
3% - 3%
0.03ms - 0.03ms
slower ❌
3% - 3%
0.03ms - 0.03ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link

Size Change: -14 B (0%)

Total Size: 60.1 kB

Filename Size Change
dist/preact.js 4.55 kB -2 B (0%)
dist/preact.min.js 4.59 kB -3 B (0%)
dist/preact.min.module.js 4.59 kB -2 B (0%)
dist/preact.min.umd.js 4.62 kB -2 B (0%)
dist/preact.module.js 4.58 kB -2 B (0%)
dist/preact.umd.js 4.63 kB -3 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 4 kB 0 B
compat/dist/compat.module.js 3.92 kB 0 B
compat/dist/compat.umd.js 4.06 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 241 B 0 B
devtools/dist/devtools.umd.js 316 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 Feb 22, 2024

Coverage Status

coverage: 99.472%. remained the same
when pulling 6bbbf3b on fix-invalid-vnode-id
into 53060fb on 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.

None yet

3 participants