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

Context consumer unmounting perf #4526

Merged
merged 2 commits into from
Oct 6, 2024
Merged

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Oct 4, 2024

Supersedes #3979

Set is supported in IE11 https://caniuse.com/?search=JavaScript%20Set the difference is that add returns undefined

Copy link

github-actions bot commented Oct 4, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -1% - +0% (-5.89ms - +2.33ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +3% (-0.21ms - +0.53ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -3% - +0% (-2.42ms - +0.37ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -2% - +2% (-0.27ms - +0.41ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +2% (-0.44ms - +1.50ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -4% - +3% (-0.09ms - +0.07ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -4% - +1% (-1.57ms - +0.24ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -3% - +2% (-0.96ms - +0.85ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.05ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +1% (-0.01ms - +0.02ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +2% (-0.20ms - +0.30ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +1% (-0.01ms - +0.02ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +1% (-0.00ms - +0.02ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +1% (-0.01ms - +0.02ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -1% - +1% (-0.02ms - +0.02ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local967.00ms - 971.81ms-unsure 🔍
-1% - +0%
-5.89ms - +2.33ms
preact-main967.85ms - 974.51msunsure 🔍
-0% - +1%
-2.33ms - +5.89ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local25.38ms - 25.42ms-unsure 🔍
-0% - +0%
-0.00ms - +0.05ms
preact-main25.37ms - 25.39msunsure 🔍
-0% - +0%
-0.05ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.37ms - 17.11ms-unsure 🔍
-1% - +3%
-0.21ms - +0.53ms
preact-main16.55ms - 16.61msunsure 🔍
-3% - +1%
-0.53ms - +0.21ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.66ms - 1.69ms-unsure 🔍
-1% - +1%
-0.01ms - +0.02ms
preact-main1.66ms - 1.68msunsure 🔍
-1% - +1%
-0.02ms - +0.01ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local74.14ms - 75.26ms-unsure 🔍
-3% - +0%
-2.42ms - +0.37ms
preact-main74.44ms - 77.00msunsure 🔍
-1% - +3%
-0.37ms - +2.42ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local15.42ms - 15.75ms-unsure 🔍
-1% - +2%
-0.20ms - +0.30ms
preact-main15.35ms - 15.72msunsure 🔍
-2% - +1%
-0.30ms - +0.20ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.93ms - 17.43ms-unsure 🔍
-2% - +2%
-0.27ms - +0.41ms
preact-main16.88ms - 17.34msunsure 🔍
-2% - +2%
-0.41ms - +0.27ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.59ms - 4.61ms-unsure 🔍
-0% - +1%
-0.01ms - +0.02ms
preact-main4.58ms - 4.60msunsure 🔍
-1% - +0%
-0.02ms - +0.01ms
-
replace1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local71.90ms - 73.53ms-unsure 🔍
-1% - +2%
-0.44ms - +1.50ms
preact-main71.66ms - 72.71msunsure 🔍
-2% - +1%
-1.50ms - +0.44ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.59ms - 3.62ms-unsure 🔍
-0% - +1%
-0.00ms - +0.02ms
preact-main3.59ms - 3.60msunsure 🔍
-1% - +0%
-0.02ms - +0.00ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local30.47ms - 31.11ms-unsure 🔍
-1% - +2%
-0.31ms - +0.53ms
preact-main30.41ms - 30.95msunsure 🔍
-2% - +1%
-0.53ms - +0.31ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local36.02ms - 37.57ms-unsure 🔍
-2% - +5%
-0.55ms - +1.66ms
preact-main35.46ms - 37.02msunsure 🔍
-4% - +1%
-1.66ms - +0.55ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local25.85ms - 26.23ms-unsure 🔍
-2% - +0%
-0.54ms - +0.03ms
preact-main26.08ms - 26.52msunsure 🔍
-0% - +2%
-0.03ms - +0.54ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local26.69ms - 27.79ms-unsure 🔍
-1% - +4%
-0.34ms - +1.18ms
preact-main26.29ms - 27.34msunsure 🔍
-4% - +1%
-1.18ms - +0.34ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local20.92ms - 21.55ms-unsure 🔍
-2% - +3%
-0.33ms - +0.59ms
preact-main20.77ms - 21.44msunsure 🔍
-3% - +2%
-0.59ms - +0.33ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local22.57ms - 23.28ms-unsure 🔍
-2% - +2%
-0.38ms - +0.40ms
preact-main22.75ms - 23.09msunsure 🔍
-2% - +2%
-0.40ms - +0.38ms
-
text-update

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.97ms - 2.08ms-unsure 🔍
-4% - +3%
-0.09ms - +0.07ms
preact-main1.98ms - 2.09msunsure 🔍
-3% - +4%
-0.07ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.12ms - 1.12ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main1.12ms - 1.12msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local34.27ms - 34.51ms-unsure 🔍
-4% - +1%
-1.57ms - +0.24ms
preact-main34.16ms - 35.95msunsure 🔍
-1% - +5%
-0.24ms - +1.57ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.23ms - 1.25ms-unsure 🔍
-1% - +1%
-0.01ms - +0.02ms
preact-main1.23ms - 1.24msunsure 🔍
-1% - +1%
-0.02ms - +0.01ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local34.12ms - 35.41ms-unsure 🔍
-3% - +2%
-0.96ms - +0.85ms
preact-main34.18ms - 35.45msunsure 🔍
-2% - +3%
-0.85ms - +0.96ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.54ms - 3.56ms-unsure 🔍
-1% - +1%
-0.02ms - +0.02ms
preact-main3.54ms - 3.57msunsure 🔍
-1% - +1%
-0.02ms - +0.02ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link

github-actions bot commented Oct 4, 2024

Size Change: +44 B (+0.07%)

Total Size: 62.1 kB

Filename Size Change
dist/preact.js 4.67 kB +9 B (+0.19%)
dist/preact.min.js 4.69 kB +7 B (+0.15%)
dist/preact.min.module.js 4.69 kB +8 B (+0.17%)
dist/preact.min.umd.js 4.72 kB +7 B (+0.15%)
dist/preact.module.js 4.68 kB +7 B (+0.15%)
dist/preact.umd.js 4.73 kB +6 B (+0.13%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.13 kB
compat/dist/compat.module.js 4.05 kB
compat/dist/compat.umd.js 4.19 kB
debug/dist/debug.js 3.82 kB
debug/dist/debug.module.js 3.83 kB
debug/dist/debug.umd.js 3.9 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.module.js 274 B
devtools/dist/devtools.umd.js 346 B
hooks/dist/hooks.js 1.53 kB
hooks/dist/hooks.module.js 1.56 kB
hooks/dist/hooks.umd.js 1.6 kB
jsx-runtime/dist/jsxRuntime.js 976 B
jsx-runtime/dist/jsxRuntime.module.js 949 B
jsx-runtime/dist/jsxRuntime.umd.js 1.05 kB
test-utils/dist/testUtils.js 451 B
test-utils/dist/testUtils.module.js 456 B
test-utils/dist/testUtils.umd.js 536 B

compressed-size-action

@coveralls
Copy link

coveralls commented Oct 4, 2024

Coverage Status

coverage: 99.488%. remained the same
when pulling 57fa02b on context-unmounting-perf
into 87f7efa on main.

@JoviDeCroock JoviDeCroock marked this pull request as ready for review October 4, 2024 08:44
@JoviDeCroock JoviDeCroock merged commit ad3bc3b into main Oct 6, 2024
13 checks passed
@JoviDeCroock JoviDeCroock deleted the context-unmounting-perf branch October 6, 2024 10:45
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