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

Remove contains with a simple parentNode check #4666

Merged
merged 1 commit into from
Feb 14, 2025
Merged

Conversation

JoviDeCroock
Copy link
Member

We basically want to check whether the following node is unmounted, which can also be done by checking for the presence of parentNode

Copy link

github-actions bot commented Feb 14, 2025

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +0% (-3.64ms - +3.85ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +1% (-0.03ms - +0.09ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +3% (-0.49ms - +2.37ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -1% - +0% (-0.21ms - +0.06ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +1% (-0.66ms - +0.38ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +2% (-0.10ms - +0.05ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -2% - +4% (-0.69ms - +1.54ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -5% - +1% (-1.64ms - +0.46ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.02ms - +0.01ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +2% (-0.02ms - +0.03ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -4% - +3% (-0.41ms - +0.34ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -1% - +1% (-0.03ms - +0.02ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +1% (-0.01ms - +0.02ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +3% (-0.01ms - +0.03ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -1% - +0% (-0.04ms - +0.01ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local927.28ms - 931.42ms-unsure 🔍
-0% - +0%
-3.64ms - +3.85ms
preact-main926.13ms - 932.36msunsure 🔍
-0% - +0%
-3.85ms - +3.64ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local19.20ms - 19.22ms-unsure 🔍
-0% - +0%
-0.02ms - +0.01ms
preact-main19.20ms - 19.22msunsure 🔍
-0% - +0%
-0.01ms - +0.02ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.56ms - 16.67ms-unsure 🔍
-0% - +1%
-0.03ms - +0.09ms
preact-main16.57ms - 16.61msunsure 🔍
-1% - +0%
-0.09ms - +0.03ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.53ms - 1.57ms-unsure 🔍
-1% - +2%
-0.02ms - +0.03ms
preact-main1.52ms - 1.56msunsure 🔍
-2% - +1%
-0.03ms - +0.02ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local77.24ms - 79.24ms-unsure 🔍
-1% - +3%
-0.49ms - +2.37ms
preact-main76.28ms - 78.32msunsure 🔍
-3% - +1%
-2.37ms - +0.49ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local10.60ms - 11.04ms-unsure 🔍
-4% - +3%
-0.41ms - +0.34ms
preact-main10.55ms - 11.16msunsure 🔍
-3% - +4%
-0.34ms - +0.41ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.38ms - 16.64ms-unsure 🔍
-1% - +0%
-0.21ms - +0.06ms
preact-main16.55ms - 16.61msunsure 🔍
-0% - +1%
-0.06ms - +0.21ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.76ms - 3.80ms-unsure 🔍
-1% - +1%
-0.03ms - +0.02ms
preact-main3.77ms - 3.81msunsure 🔍
-1% - +1%
-0.02ms - +0.03ms
-
replace1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local66.02ms - 66.71ms-unsure 🔍
-1% - +1%
-0.66ms - +0.38ms
preact-main66.11ms - 66.90msunsure 🔍
-1% - +1%
-0.38ms - +0.66ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.97ms - 3.00ms-unsure 🔍
-0% - +1%
-0.01ms - +0.02ms
preact-main2.97ms - 2.99msunsure 🔍
-1% - +0%
-0.02ms - +0.01ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local29.67ms - 30.31ms-unsure 🔍
-2% - +2%
-0.50ms - +0.49ms
preact-main29.61ms - 30.37msunsure 🔍
-2% - +2%
-0.49ms - +0.50ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local33.37ms - 34.39ms-unsure 🔍
-2% - +2%
-0.73ms - +0.62ms
preact-main33.49ms - 34.38msunsure 🔍
-2% - +2%
-0.62ms - +0.73ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local25.45ms - 25.79ms-unsure 🔍
-2% - +1%
-0.48ms - +0.22ms
preact-main25.45ms - 26.06msunsure 🔍
-1% - +2%
-0.22ms - +0.48ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local24.66ms - 25.81ms-unsure 🔍
-4% - +2%
-1.03ms - +0.59ms
preact-main24.88ms - 26.02msunsure 🔍
-2% - +4%
-0.59ms - +1.03ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local25.03ms - 26.23ms-unsure 🔍
-2% - +5%
-0.43ms - +1.22ms
preact-main24.67ms - 25.80msunsure 🔍
-5% - +2%
-1.22ms - +0.43ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local20.13ms - 20.53ms-unsure 🔍
-1% - +2%
-0.27ms - +0.32ms
preact-main20.09ms - 20.52msunsure 🔍
-2% - +1%
-0.32ms - +0.27ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 140
  • Built by: CI #4395
  • Commit: 5f79e91

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.07ms - 2.18ms-unsure 🔍
-5% - +2%
-0.10ms - +0.05ms
preact-main2.10ms - 2.20msunsure 🔍
-2% - +5%
-0.05ms - +0.10ms
-

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-local33.66ms - 35.87ms-unsure 🔍
-2% - +4%
-0.69ms - +1.54ms
preact-main34.18ms - 34.50msunsure 🔍
-4% - +2%
-1.54ms - +0.69ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.23ms - 1.26ms-unsure 🔍
-1% - +3%
-0.01ms - +0.03ms
preact-main1.22ms - 1.25msunsure 🔍
-3% - +1%
-0.03ms - +0.01ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.38ms - 34.65ms-unsure 🔍
-5% - +1%
-1.64ms - +0.46ms
preact-main33.77ms - 35.44msunsure 🔍
-1% - +5%
-0.46ms - +1.64ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.93ms - 2.96ms-unsure 🔍
-1% - +0%
-0.04ms - +0.01ms
preact-main2.94ms - 2.98msunsure 🔍
-0% - +1%
-0.01ms - +0.04ms
-

tachometer-reporter-action v2 for CI

Copy link

github-actions bot commented Feb 14, 2025

Size Change: -50 B (-0.11%)

Total Size: 46.6 kB

Filename Size Change
compat/dist/compat.js 3.77 kB -12 B (-0.32%)
compat/dist/compat.mjs 3.68 kB -11 B (-0.3%)
compat/dist/compat.umd.js 3.82 kB -11 B (-0.29%)
dist/preact.js 4.58 kB -6 B (-0.13%)
dist/preact.mjs 4.6 kB -5 B (-0.11%)
dist/preact.umd.js 4.68 kB -5 B (-0.11%)
ℹ️ View Unchanged
Filename Size
debug/dist/debug.js 3.87 kB
debug/dist/debug.mjs 3.87 kB
debug/dist/debug.umd.js 3.95 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.mjs 270 B
devtools/dist/devtools.umd.js 346 B
hooks/dist/hooks.js 1.55 kB
hooks/dist/hooks.mjs 1.58 kB
hooks/dist/hooks.umd.js 1.62 kB
jsx-runtime/dist/jsxRuntime.js 861 B
jsx-runtime/dist/jsxRuntime.mjs 830 B
jsx-runtime/dist/jsxRuntime.umd.js 934 B
test-utils/dist/testUtils.js 473 B
test-utils/dist/testUtils.mjs 473 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

@JoviDeCroock JoviDeCroock merged commit 016d368 into v11-2 Feb 14, 2025
13 checks passed
@JoviDeCroock JoviDeCroock deleted the remove-contains branch February 14, 2025 11:57
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.

2 participants