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

Size optimizations for excessDomChildren #2960

Merged
merged 1 commit into from Jan 24, 2021

Conversation

developit
Copy link
Member

This optimizes excessDomChildren usage while retaining the comment resiliency (issue #2950) added in #2956, which was a revert of the optimization in #2942. The size should be smaller than my original optimization, but properly ignores nodes that are not elements/text.

@github-actions
Copy link

github-actions bot commented Jan 24, 2021

📊 Tachometer Benchmark Results

Summary

duration

  • 02_replace1k: unsure 🔍 -2% - +1% (-3.25ms - +1.00ms)
    preact-local vs preact-master
  • 03_update10th1k_x16: unsure 🔍 -2% - +5% (-0.71ms - +1.56ms)
    preact-local vs preact-master
  • 07_create10k: unsure 🔍 -0% - +0% (-2.98ms - +6.38ms)
    preact-local vs preact-master
  • filter_list: unsure 🔍 -1% - +2% (-0.34ms - +0.58ms)
    preact-local vs preact-master
  • hydrate1k: unsure 🔍 -0% - +2% (-0.26ms - +2.48ms)
    preact-local vs preact-master
  • many_updates: unsure 🔍 -13% - +0% (-5.39ms - +0.12ms)
    preact-local vs preact-master
  • text_update: unsure 🔍 -0% - +1% (-0.00ms - +0.03ms)
    preact-local vs preact-master

usedJSHeapSize

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

Results

02_replace1k

duration

VersionAvg timevs preact-mastervs preact-local
preact-master193.58ms - 196.86ms-unsure 🔍
-1% - +2%
-1.00ms - +3.25ms
preact-local192.74ms - 195.44msunsure 🔍
-2% - +1%
-3.25ms - +1.00ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.59ms - 3.60ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
preact-local3.59ms - 3.60msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-

run-warmup-0

VersionAvg timevs preact-mastervs preact-local
preact-master72.76ms - 74.73ms-unsure 🔍
-2% - +2%
-1.14ms - +1.48ms
preact-local72.71ms - 74.43msunsure 🔍
-2% - +2%
-1.48ms - +1.14ms
-

run-warmup-1

VersionAvg timevs preact-mastervs preact-local
preact-master111.36ms - 113.68ms-unsure 🔍
-1% - +2%
-1.43ms - +1.84ms
preact-local111.16ms - 113.47msunsure 🔍
-2% - +1%
-1.84ms - +1.43ms
-

run-warmup-2

VersionAvg timevs preact-mastervs preact-local
preact-master129.85ms - 134.38ms-unsure 🔍
-3% - +1%
-4.63ms - +1.01ms
preact-local132.24ms - 135.61msunsure 🔍
-1% - +4%
-1.01ms - +4.63ms
-

run-warmup-3

VersionAvg timevs preact-mastervs preact-local
preact-master75.94ms - 79.43ms-unsure 🔍
-2% - +3%
-1.86ms - +2.56ms
preact-local75.97ms - 78.69msunsure 🔍
-3% - +2%
-2.56ms - +1.86ms
-

run-warmup-4

VersionAvg timevs preact-mastervs preact-local
preact-master142.95ms - 148.46ms-unsure 🔍
-3% - +1%
-5.10ms - +1.14ms
preact-local146.23ms - 149.14msunsure 🔍
-1% - +4%
-1.14ms - +5.10ms
-

run-final

VersionAvg timevs preact-mastervs preact-local
preact-master75.57ms - 77.73ms-unsure 🔍
-1% - +3%
-0.60ms - +2.03ms
preact-local75.19ms - 76.68msunsure 🔍
-3% - +1%
-2.03ms - +0.60ms
-
03_update10th1k_x16

duration

VersionAvg timevs preact-mastervs preact-local
preact-master32.28ms - 33.82ms-unsure 🔍
-5% - +2%
-1.56ms - +0.71ms
preact-local32.64ms - 34.31msunsure 🔍
-2% - +5%
-0.71ms - +1.56ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master3.51ms - 3.52ms-unsure 🔍
-0% - +0%
-0.01ms - +0.00ms
preact-local3.51ms - 3.52msunsure 🔍
-0% - +0%
-0.00ms - +0.01ms
-
07_create10k

duration

VersionAvg timevs preact-mastervs preact-local
preact-master1420.86ms - 1428.93ms-unsure 🔍
-0% - +0%
-6.38ms - +2.98ms
preact-local1424.23ms - 1428.96msunsure 🔍
-0% - +0%
-2.98ms - +6.38ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master25.98ms - 25.99ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local25.99ms - 25.99msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter_list

duration

VersionAvg timevs preact-mastervs preact-local
preact-master26.40ms - 27.05ms-unsure 🔍
-2% - +1%
-0.58ms - +0.34ms
preact-local26.52ms - 27.17msunsure 🔍
-1% - +2%
-0.34ms - +0.58ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master1.60ms - 1.60ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local1.60ms - 1.60msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k

duration

VersionAvg timevs preact-mastervs preact-local
preact-master147.05ms - 149.16ms-unsure 🔍
-2% - +0%
-2.48ms - +0.26ms
preact-local148.33ms - 150.09msunsure 🔍
-0% - +2%
-0.26ms - +2.48ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master6.19ms - 6.19ms-unsure 🔍
-0% - -0%
-0.00ms - -0.00ms
preact-local6.19ms - 6.19msunsure 🔍
+0% - +0%
+0.00ms - +0.00ms
-
many_updates

duration

VersionAvg timevs preact-mastervs preact-local
preact-master38.71ms - 42.84ms-unsure 🔍
-1% - +14%
-0.12ms - +5.39ms
preact-local36.32ms - 39.96msunsure 🔍
-13% - +0%
-5.39ms - +0.12ms
-

usedJSHeapSize

VersionAvg timevs preact-mastervs preact-local
preact-master4.84ms - 4.84ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-local4.84ms - 4.84msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
text_update

duration

VersionAvg timevs preact-mastervs preact-local
preact-master2.88ms - 2.90ms-unsure 🔍
-1% - +0%
-0.03ms - +0.00ms
preact-local2.89ms - 2.92msunsure 🔍
-0% - +1%
-0.00ms - +0.03ms
-

usedJSHeapSize

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

tachometer-reporter-action v2 for Benchmarks

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 99.441% when pulling 44f17a1 on diffchildren-size-optimizations into 47c521d on master.

@github-actions
Copy link

Size Change: -21 B (0%)

Total Size: 42.1 kB

Filename Size Change
dist/preact.js 3.93 kB -14 B (0%)
dist/preact.min.js 3.98 kB -1 B
dist/preact.module.js 3.97 kB -7 B (0%)
dist/preact.umd.js 4.02 kB +1 B
ℹ️ View Unchanged
Filename Size Change
compat/dist/compat.js 3.45 kB 0 B
compat/dist/compat.module.js 3.47 kB 0 B
compat/dist/compat.umd.js 3.51 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 240 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.15 kB 0 B
hooks/dist/hooks.umd.js 1.2 kB 0 B
jsx-runtime/dist/jsxRuntime.js 327 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 335 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 405 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

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

4 participants