Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Handle errors during hydration #4563

Merged
merged 1 commit into from
Nov 23, 2024
Merged

Conversation

JoviDeCroock
Copy link
Member

Resolves #2539

I guess this is a choice we have to make, this fixes our hydration algorithm to only think about resumed hydration when our caught error is a Promise.

Copy link

github-actions bot commented Nov 22, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -1% - +0% (-4.83ms - +2.13ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +0% (-0.15ms - +0.04ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +2% (-1.12ms - +1.35ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -4% - +3% (-0.65ms - +0.40ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +1% (-0.75ms - +0.82ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -7% - +3% (-0.15ms - +0.06ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -5% - +2% (-1.64ms - +0.73ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -2% - +4% (-0.87ms - +1.53ms)
    preact-local vs preact-main

usedJSHeapSize

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

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local950.08ms - 954.94ms-unsure 🔍
-1% - +0%
-4.83ms - +2.13ms
preact-main951.38ms - 956.34msunsure 🔍
-0% - +1%
-2.13ms - +4.83ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local24.84ms - 24.84ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main24.84ms - 24.84msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.57ms - 16.66ms-unsure 🔍
-1% - +0%
-0.15ms - +0.04ms
preact-main16.59ms - 16.76msunsure 🔍
-0% - +1%
-0.04ms - +0.15ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.65ms - 1.66ms-unsure 🔍
-1% - +0%
-0.02ms - +0.01ms
preact-main1.65ms - 1.67msunsure 🔍
-0% - +1%
-0.01ms - +0.02ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local75.68ms - 77.86ms-unsure 🔍
-1% - +2%
-1.12ms - +1.35ms
preact-main76.08ms - 77.24msunsure 🔍
-2% - +1%
-1.35ms - +1.12ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local12.81ms - 13.50ms-unsure 🔍
-6% - +0%
-0.88ms - +0.07ms
preact-main13.23ms - 13.89msunsure 🔍
-1% - +7%
-0.07ms - +0.88ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local15.50ms - 16.11ms-unsure 🔍
-4% - +3%
-0.65ms - +0.40ms
preact-main15.50ms - 16.36msunsure 🔍
-3% - +4%
-0.40ms - +0.65ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.49ms - 4.50ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-main4.49ms - 4.51msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #4063
  • Commit: 38080ea

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.32ms - 69.41ms-unsure 🔍
-1% - +1%
-0.75ms - +0.82ms
preact-main68.26ms - 69.40msunsure 🔍
-1% - +1%
-0.82ms - +0.75ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.56ms - 3.59ms-unsure 🔍
-1% - +0%
-0.02ms - +0.02ms
preact-main3.56ms - 3.59msunsure 🔍
-0% - +1%
-0.02ms - +0.02ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local30.96ms - 31.62ms-unsure 🔍
-1% - +2%
-0.26ms - +0.66ms
preact-main30.76ms - 31.41msunsure 🔍
-2% - +1%
-0.66ms - +0.26ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local36.36ms - 37.53ms-faster ✔
0% - 5%
0.01ms - 1.75ms
preact-main37.18ms - 38.47msslower ❌
0% - 5%
0.01ms - 1.75ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local30.17ms - 31.20ms-unsure 🔍
-2% - +3%
-0.71ms - +0.77ms
preact-main30.12ms - 31.19msunsure 🔍
-3% - +2%
-0.77ms - +0.71ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local22.88ms - 23.37ms-unsure 🔍
-1% - +2%
-0.28ms - +0.40ms
preact-main22.84ms - 23.30msunsure 🔍
-2% - +1%
-0.40ms - +0.28ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local21.79ms - 22.04ms-unsure 🔍
-3% - +0%
-0.75ms - +0.09ms
preact-main21.84ms - 22.65msunsure 🔍
-0% - +3%
-0.09ms - +0.75ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local20.35ms - 20.83ms-unsure 🔍
-2% - +1%
-0.50ms - +0.21ms
preact-main20.47ms - 21.00msunsure 🔍
-1% - +2%
-0.21ms - +0.50ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 220
  • Built by: CI #4063
  • Commit: 38080ea

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.02ms - 2.18ms-unsure 🔍
-7% - +3%
-0.15ms - +0.06ms
preact-main2.08ms - 2.21msunsure 🔍
-3% - +7%
-0.06ms - +0.15ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.10ms - 1.11ms-unsure 🔍
-0% - +1%
-0.00ms - +0.01ms
preact-main1.10ms - 1.11msunsure 🔍
-1% - +0%
-0.01ms - +0.00ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local33.48ms - 34.19ms-unsure 🔍
-5% - +2%
-1.64ms - +0.73ms
preact-main33.15ms - 35.41msunsure 🔍
-2% - +5%
-0.73ms - +1.64ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.22ms - 1.23ms-unsure 🔍
-1% - +1%
-0.01ms - +0.01ms
preact-main1.22ms - 1.23msunsure 🔍
-1% - +1%
-0.01ms - +0.01ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local34.76ms - 36.28ms-unsure 🔍
-2% - +4%
-0.87ms - +1.53ms
preact-main34.26ms - 36.12msunsure 🔍
-4% - +2%
-1.53ms - +0.87ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.47ms - 3.49ms-unsure 🔍
-0% - +1%
-0.00ms - +0.02ms
preact-main3.47ms - 3.48msunsure 🔍
-1% - +0%
-0.02ms - +0.00ms
-

tachometer-reporter-action v2 for CI

Copy link

Size Change: +142 B (+0.23%)

Total Size: 62.4 kB

Filename Size Change
dist/preact.js 4.72 kB +24 B (+0.51%)
dist/preact.min.js 4.73 kB +23 B (+0.49%)
dist/preact.min.module.js 4.75 kB +23 B (+0.49%)
dist/preact.min.umd.js 4.76 kB +22 B (+0.46%)
dist/preact.module.js 4.74 kB +27 B (+0.57%)
dist/preact.umd.js 4.78 kB +23 B (+0.48%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.13 kB
compat/dist/compat.module.js 4.06 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.52 kB
hooks/dist/hooks.module.js 1.56 kB
hooks/dist/hooks.umd.js 1.6 kB
jsx-runtime/dist/jsxRuntime.js 973 B
jsx-runtime/dist/jsxRuntime.module.js 947 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

Coverage Status

coverage: 99.488% (+0.001%) from 99.487%
when pulling 38080ea on handle-errors-during-hydration
into 6590e26 on main.

@JoviDeCroock JoviDeCroock merged commit 22621b6 into main Nov 23, 2024
15 checks passed
@JoviDeCroock JoviDeCroock deleted the handle-errors-during-hydration branch November 23, 2024 06:37
@JoviDeCroock JoviDeCroock mentioned this pull request Dec 1, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug when hydrating with error boundary
4 participants