preact icon indicating copy to clipboard operation
preact copied to clipboard

Hydrate HTML Comments: part 3

Open developit opened this issue 3 years ago • 3 comments
trafficstars

This is an addendum to #3327 that changes how comment/cdata/doctype/etc nodes are handled during hydration. Instead of skipping over those nodes when performing matching, they are excluded from exccessDomChildren entirely. Also, any insertions performed during diffing will now use the next Element/Text node instead of .nextSibling, which could be a comment.

developit avatar Nov 22 '21 21:11 developit

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -1% - +3% (-1.28ms - +4.05ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: slower ❌ 2% - 9% (0.62ms - 2.64ms)
    preact-local vs preact-master
  • 07_create10k: faster ✔ 0% - 1% (0.76ms - 28.17ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -3% - +4% (-0.89ms - +1.28ms)
    preact-local vs preact-master
  • hydrate1k: slower ❌ 5% - 12% (11.63ms - 25.38ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -5% - +4% (-1.48ms - +1.23ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -2% - +5% (-0.09ms - +0.18ms)
    preact-local vs preact-master

usedJSHeapSize

  • 02_replace1k: unsure 🔍 -0% - +1% (-0.00ms - +0.02ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: slower ❌ 0% - 1% (0.01ms - 0.04ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-master
  • hydrate1k: faster ✔ 2% - 3% (0.10ms - 0.16ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 +0% - +0% (+0.01ms - +0.01ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-master

Results

02_replace1k
  • Browser: chrome-headless 95.0.4638.69
  • Sample size: 80
  • Built by: Benchmarks #539
  • Commit: 7f179f8

duration

VersionAvg timevs preact-mastervs preact-local
preact-master129.73ms - 133.63ms-unsure 🔍
-3% - +1%
-4.05ms - +1.28ms
preact-local131.25ms - 134.88msunsure 🔍
-1% - +3%
-1.28ms - +4.05ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.47ms - 3.48ms-unsure 🔍
-1% - +0%
-0.02ms - +0.00ms
preact-local3.48ms - 3.50msunsure 🔍
-0% - +1%
-0.00ms - +0.02ms
-

run-warmup-0

VersionAvg timevs preact-mastervs preact-local
preact-master54.25ms - 55.90ms-unsure 🔍
-1% - +4%
-0.56ms - +1.91ms
preact-local53.48ms - 55.32msunsure 🔍
-3% - +1%
-1.91ms - +0.56ms
-

run-warmup-1

VersionAvg timevs preact-mastervs preact-local
preact-master84.11ms - 87.70ms-unsure 🔍
-2% - +4%
-1.69ms - +3.00ms
preact-local83.75ms - 86.76msunsure 🔍
-3% - +2%
-3.00ms - +1.69ms
-

run-warmup-2

VersionAvg timevs preact-mastervs preact-local
preact-master71.32ms - 78.82ms-unsure 🔍
-2% - +14%
-0.97ms - +9.53ms
preact-local67.11ms - 74.46msunsure 🔍
-12% - +1%
-9.53ms - +0.97ms
-

run-warmup-3

VersionAvg timevs preact-mastervs preact-local
preact-master50.93ms - 58.05ms-unsure 🔍
-14% - +3%
-8.04ms - +2.11ms
preact-local53.84ms - 61.07msunsure 🔍
-4% - +15%
-2.11ms - +8.04ms
-

run-warmup-4

VersionAvg timevs preact-mastervs preact-local
preact-master78.73ms - 81.85ms-unsure 🔍
-4% - +2%
-2.99ms - +1.49ms
preact-local79.43ms - 82.64msunsure 🔍
-2% - +4%
-1.49ms - +2.99ms
-

run-final

VersionAvg timevs preact-mastervs preact-local
preact-master44.64ms - 47.37ms-unsure 🔍
-7% - +0%
-3.49ms - +0.22ms
preact-local46.38ms - 48.90msunsure 🔍
-1% - +8%
-0.22ms - +3.49ms
-
03_update10th1k_x16
  • Browser: chrome-headless 95.0.4638.69
  • Sample size: 130
  • Built by: Benchmarks #539
  • Commit: 7f179f8

duration

VersionAvg timevs preact-mastervs preact-local
preact-master30.54ms - 31.94ms-faster ✔
2% - 8%
0.62ms - 2.64ms
preact-local32.14ms - 33.59msslower ❌
2% - 9%
0.62ms - 2.64ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.52ms - 3.54ms-faster ✔
0% - 1%
0.01ms - 0.04ms
preact-local3.55ms - 3.56msslower ❌
0% - 1%
0.01ms - 0.04ms
-
07_create10k
  • Browser: chrome-headless 95.0.4638.69
  • Sample size: 50
  • Built by: Benchmarks #539
  • Commit: 7f179f8

duration

VersionAvg timevs preact-mastervs preact-local
preact-master1918.53ms - 1937.42ms-slower ❌
0% - 1%
0.76ms - 28.17ms
preact-local1903.58ms - 1923.44msfaster ✔
0% - 1%
0.76ms - 28.17ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master25.32ms - 25.32ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
preact-local25.32ms - 25.32msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-
filter_list
  • Browser: chrome-headless 95.0.4638.69
  • Sample size: 60
  • Built by: Benchmarks #539
  • Commit: 7f179f8

duration

VersionAvg timevs preact-mastervs preact-local
preact-master30.42ms - 32.07ms-unsure 🔍
-4% - +3%
-1.28ms - +0.89ms
preact-local30.73ms - 32.15msunsure 🔍
-3% - +4%
-0.89ms - +1.28ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master1.54ms - 1.54ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
preact-local1.54ms - 1.55msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-
hydrate1k
  • Browser: chrome-headless 95.0.4638.69
  • Sample size: 60
  • Built by: Benchmarks #539
  • Commit: 7f179f8

duration

VersionAvg timevs preact-mastervs preact-local
preact-master202.32ms - 215.38ms-faster ✔
5% - 11%
11.63ms - 25.38ms
preact-local225.21ms - 229.51msslower ❌
5% - 12%
11.63ms - 25.38ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master6.16ms - 6.23ms-slower ❌
2% - 3%
0.10ms - 0.16ms
preact-local6.06ms - 6.07msfaster ✔
2% - 3%
0.10ms - 0.16ms
-
many_updates
  • Browser: chrome-headless 95.0.4638.69
  • Sample size: 70
  • Built by: Benchmarks #539
  • Commit: 7f179f8

duration

VersionAvg timevs preact-mastervs preact-local
preact-master31.09ms - 32.96ms-unsure 🔍
-4% - +5%
-1.23ms - +1.48ms
preact-local30.92ms - 32.88msunsure 🔍
-5% - +4%
-1.48ms - +1.23ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master4.61ms - 4.61ms-unsure 🔍
-0% - -0%
-0.01ms - -0.01ms
preact-local4.62ms - 4.62msunsure 🔍
+0% - +0%
+0.01ms - +0.01ms
-
text_update
  • Browser: chrome-headless 95.0.4638.69
  • Sample size: 200
  • Built by: Benchmarks #539
  • Commit: 7f179f8

duration

VersionAvg timevs preact-mastervs preact-local
preact-master3.57ms - 3.81ms-unsure 🔍
-5% - +2%
-0.18ms - +0.09ms
preact-local3.67ms - 3.80msunsure 🔍
-2% - +5%
-0.09ms - +0.18ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master0.78ms - 0.78ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
preact-local0.78ms - 0.78msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-

tachometer-reporter-action v2 for Benchmarks

github-actions[bot] avatar Nov 22 '21 21:11 github-actions[bot]

Coverage Status

Coverage increased (+0.003%) to 99.627% when pulling 7f179f8a5cc3bdcce184f0c1fa62c6845cbb8e2f on hydrate-html-comments-wip3 into 515e94b260102532250fb5f7c43ff20e8bbb3bc9 on master.

coveralls avatar Nov 22 '21 21:11 coveralls

Size Change: +132 B (0%)

Total Size: 42.2 kB

Filename Size Change
dist/preact.js 4 kB +39 B (0%)
dist/preact.min.js 4.02 kB +31 B (0%)
dist/preact.module.js 4.02 kB +29 B (0%)
dist/preact.umd.js 4.06 kB +33 B (0%)
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.44 kB 0 B
compat/dist/compat.module.js 3.42 kB 0 B
compat/dist/compat.umd.js 3.49 kB 0 B
debug/dist/debug.js 2.99 kB 0 B
debug/dist/debug.module.js 2.98 kB 0 B
debug/dist/debug.umd.js 3.07 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 308 B 0 B
hooks/dist/hooks.js 1.13 kB 0 B
hooks/dist/hooks.module.js 1.14 kB 0 B
hooks/dist/hooks.umd.js 1.2 kB 0 B
jsx-runtime/dist/jsxRuntime.js 317 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 327 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 395 B 0 B
test-utils/dist/testUtils.js 437 B 0 B
test-utils/dist/testUtils.module.js 439 B 0 B
test-utils/dist/testUtils.umd.js 515 B 0 B

compressed-size-action

github-actions[bot] avatar Nov 22 '21 21:11 github-actions[bot]