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

Address context fragments issue #4717

Merged
merged 3 commits into from
Feb 27, 2025
Merged

Address context fragments issue #4717

merged 3 commits into from
Feb 27, 2025

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Feb 27, 2025

Fixes #4716

When we do strict equality bailouts we rely on props.children as we aren't invoking render, this rather than setting the top-level fragment children to null clones them.

I've confirmed that the memory leak of #4679 is still addressed

Copy link

github-actions bot commented Feb 27, 2025

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: faster ✔ 0% - 1% (0.50ms - 9.82ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +1% (-0.00ms - +0.17ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +1% (-1.31ms - +0.56ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -1% - +3% (-0.18ms - +0.53ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -3% - +1% (-1.89ms - +0.95ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +3% (-0.10ms - +0.06ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +2% (-0.24ms - +0.76ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -1% - +5% (-0.47ms - +1.47ms)
    preact-local vs preact-main

usedJSHeapSize

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

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local957.21ms - 962.85ms-faster ✔
0% - 1%
0.50ms - 9.82ms
preact-main961.48ms - 968.90msslower ❌
0% - 1%
0.50ms - 9.82ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local19.18ms - 19.19ms-unsure 🔍
-0% - +0%
-0.02ms - +0.00ms
preact-main19.18ms - 19.20msunsure 🔍
-0% - +0%
-0.00ms - +0.02ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.58ms - 16.75ms-unsure 🔍
-0% - +1%
-0.00ms - +0.17ms
preact-main16.55ms - 16.60msunsure 🔍
-1% - +0%
-0.17ms - +0.00ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.53ms - 1.54ms-unsure 🔍
-2% - +0%
-0.02ms - +0.01ms
preact-main1.53ms - 1.56msunsure 🔍
-0% - +2%
-0.01ms - +0.02ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local76.22ms - 77.70ms-unsure 🔍
-2% - +1%
-1.31ms - +0.56ms
preact-main76.75ms - 77.91msunsure 🔍
-1% - +2%
-0.56ms - +1.31ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local9.07ms - 9.55ms-unsure 🔍
-3% - +5%
-0.25ms - +0.46ms
preact-main8.95ms - 9.46msunsure 🔍
-5% - +3%
-0.46ms - +0.25ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.39ms - 17.10ms-unsure 🔍
-1% - +3%
-0.18ms - +0.53ms
preact-main16.55ms - 16.59msunsure 🔍
-3% - +1%
-0.53ms - +0.18ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.77ms - 3.80ms-unsure 🔍
-0% - +1%
-0.02ms - +0.03ms
preact-main3.77ms - 3.80msunsure 🔍
-1% - +0%
-0.03ms - +0.02ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #4581
  • Commit: efd59b5

duration

VersionAvg timevs preact-localvs preact-main
preact-local70.32ms - 71.97ms-unsure 🔍
-3% - +1%
-1.89ms - +0.95ms
preact-main70.46ms - 72.76msunsure 🔍
-1% - +3%
-0.95ms - +1.89ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.97ms - 2.99ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
preact-main2.98ms - 2.98msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local30.82ms - 31.53ms-unsure 🔍
-0% - +3%
-0.09ms - +0.83ms
preact-main30.52ms - 31.10msunsure 🔍
-3% - +0%
-0.83ms - +0.09ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local35.52ms - 36.43ms-unsure 🔍
-4% - +0%
-1.31ms - +0.10ms
preact-main36.05ms - 37.12msunsure 🔍
-0% - +4%
-0.10ms - +1.31ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local26.92ms - 27.48ms-unsure 🔍
-1% - +2%
-0.23ms - +0.46ms
preact-main26.88ms - 27.28msunsure 🔍
-2% - +1%
-0.46ms - +0.23ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local27.73ms - 28.36ms-unsure 🔍
-3% - +0%
-0.85ms - +0.13ms
preact-main28.03ms - 28.78msunsure 🔍
-0% - +3%
-0.13ms - +0.85ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local27.96ms - 28.59ms-unsure 🔍
-1% - +2%
-0.25ms - +0.67ms
preact-main27.73ms - 28.40msunsure 🔍
-2% - +1%
-0.67ms - +0.25ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local20.93ms - 21.38ms-unsure 🔍
-1% - +2%
-0.28ms - +0.34ms
preact-main20.90ms - 21.34msunsure 🔍
-2% - +1%
-0.34ms - +0.28ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 180
  • Built by: CI #4581
  • Commit: efd59b5

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.11ms - 2.22ms-unsure 🔍
-5% - +3%
-0.10ms - +0.06ms
preact-main2.13ms - 2.25msunsure 🔍
-3% - +5%
-0.06ms - +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-local34.08ms - 35.04ms-unsure 🔍
-1% - +2%
-0.24ms - +0.76ms
preact-main34.16ms - 34.45msunsure 🔍
-2% - +1%
-0.76ms - +0.24ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.26ms - 1.30ms-unsure 🔍
-2% - +3%
-0.02ms - +0.04ms
preact-main1.25ms - 1.29msunsure 🔍
-3% - +2%
-0.04ms - +0.02ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local32.39ms - 33.86ms-unsure 🔍
-1% - +5%
-0.47ms - +1.47ms
preact-main31.99ms - 33.26msunsure 🔍
-4% - +1%
-1.47ms - +0.47ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.96ms - 2.99ms-unsure 🔍
-1% - +1%
-0.02ms - +0.03ms
preact-main2.95ms - 2.99msunsure 🔍
-1% - +1%
-0.03ms - +0.02ms
-

tachometer-reporter-action v2 for CI

Copy link

github-actions bot commented Feb 27, 2025

Size Change: +163 B (+0.21%)

Total Size: 78.6 kB

Filename Size Change
dist/preact.js 4.76 kB +23 B (+0.49%)
dist/preact.min.js 4.77 kB +26 B (+0.55%)
dist/preact.min.module.js 4.79 kB +25 B (+0.53%)
dist/preact.min.umd.js 4.79 kB +27 B (+0.57%)
dist/preact.mjs 4.77 kB +19 B (+0.4%)
dist/preact.module.js 4.77 kB +19 B (+0.4%)
dist/preact.umd.js 4.8 kB +24 B (+0.5%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.12 kB
compat/dist/compat.mjs 4.05 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.mjs 3.82 kB
debug/dist/debug.module.js 3.82 kB
debug/dist/debug.umd.js 3.9 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.mjs 274 B
devtools/dist/devtools.module.js 274 B
devtools/dist/devtools.umd.js 346 B
hooks/dist/hooks.js 1.54 kB
hooks/dist/hooks.mjs 1.57 kB
hooks/dist/hooks.module.js 1.57 kB
hooks/dist/hooks.umd.js 1.61 kB
jsx-runtime/dist/jsxRuntime.js 978 B
jsx-runtime/dist/jsxRuntime.mjs 952 B
jsx-runtime/dist/jsxRuntime.module.js 952 B
jsx-runtime/dist/jsxRuntime.umd.js 1.05 kB
test-utils/dist/testUtils.js 473 B
test-utils/dist/testUtils.mjs 477 B
test-utils/dist/testUtils.module.js 477 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

@coveralls
Copy link

coveralls commented Feb 27, 2025

Coverage Status

coverage: 99.61% (+0.001%) from 99.609%
when pulling efd59b5 on fix-ctx-issue
into ecf6c40 on main.

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JoviDeCroock JoviDeCroock merged commit 58703d6 into main Feb 27, 2025
13 checks passed
@JoviDeCroock JoviDeCroock deleted the fix-ctx-issue branch February 27, 2025 19:36
@JoviDeCroock JoviDeCroock mentioned this pull request Feb 28, 2025
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.

Fragment unmounts when it shouldn't
3 participants