Skip to content

Comments

fix: suspension caused domslot panic#4003

Open
Madoshakalaka wants to merge 1 commit intomasterfrom
fix/hydration-trapped-domslot
Open

fix: suspension caused domslot panic#4003
Madoshakalaka wants to merge 1 commit intomasterfrom
fix/hydration-trapped-domslot

Conversation

@Madoshakalaka
Copy link
Member

Description

Fixes #4002

The fix initializes own_slot from the fragment's first node immediately

Checklist

  • I have reviewed my own code
  • I have added tests

@Madoshakalaka Madoshakalaka changed the title fix: suspension called domslot panic fix: suspension caused domslot panic Feb 24, 2026
@Madoshakalaka
Copy link
Member Author

@WorldSEnder you might be interested

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 8bb3a2f):

https://yew-rs-api--pr4003-fix-hydration-trappe-3gptkp61.web.app

(expires Tue, 03 Mar 2026 07:09:41 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

Benchmark - core

Yew Master

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.744 ns      │ 4.002 ns      │ 2.747 ns      │ 2.83 ns       │ 100     │ 1000000000

Pull Request

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.745 ns      │ 4.048 ns      │ 2.751 ns      │ 2.918 ns      │ 100     │ 1000000000

@github-actions
Copy link

Benchmark - SSR

Yew Master

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 290.958 294.095 291.622 0.899
Hello World 10 464.313 488.083 468.495 7.159
Function Router 10 1660.708 1671.790 1665.893 3.812
Concurrent Task 10 1005.553 1007.174 1006.563 0.622
Many Providers 10 1102.819 1149.922 1120.045 12.722

Pull Request

Details
Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 291.261 292.808 291.767 0.428
Hello World 10 499.177 504.167 501.021 1.810
Function Router 10 1677.327 1702.014 1691.858 8.372
Concurrent Task 10 1005.495 1007.194 1006.495 0.545
Many Providers 10 1089.294 1147.013 1116.241 16.454

@github-actions
Copy link

Size Comparison

Details
examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 96.806 96.806 0 0.000%
boids 165.403 165.403 0 0.000%
communication_child_to_parent 89.899 89.899 0 0.000%
communication_grandchild_with_grandparent 100.771 100.771 0 0.000%
communication_grandparent_to_grandchild 97.270 97.270 0 0.000%
communication_parent_to_child 87.316 87.316 0 0.000%
contexts 103.040 103.040 0 0.000%
counter 84.037 84.037 0 0.000%
counter_functional 85.411 85.411 0 0.000%
dyn_create_destroy_apps 87.123 87.123 0 0.000%
file_upload 96.566 96.566 0 0.000%
function_delayed_input 90.991 90.991 0 0.000%
function_memory_game 168.696 168.696 0 0.000%
function_router 326.599 326.599 0 0.000%
function_todomvc 160.741 160.741 0 0.000%
futures 232.128 232.128 0 0.000%
game_of_life 102.042 102.042 0 0.000%
immutable 244.423 244.423 0 0.000%
inner_html 78.616 78.616 0 0.000%
js_callback 107.494 107.494 0 0.000%
keyed_list 177.169 177.169 0 0.000%
mount_point 81.754 81.754 0 0.000%
nested_list 110.436 110.436 0 0.000%
node_refs 89.302 89.302 0 0.000%
password_strength 1726.306 1726.306 0 0.000%
portals 90.778 90.778 0 0.000%
router 296.971 296.971 0 0.000%
suspense 111.026 111.026 0 0.000%
timer 86.560 86.560 0 0.000%
timer_functional 96.107 96.107 0 0.000%
todomvc 139.338 139.338 0 0.000%
two_apps 83.903 83.903 0 0.000%
web_worker_fib 133.660 133.660 0 0.000%
web_worker_prime 184.455 184.455 0 0.000%
webgl 81.171 81.171 0 0.000%

✅ None of the examples has changed their size significantly.

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.

Hydration panic: component that suspends during first render leaves own_slot trapped, poisoning sibling DomSlot chain

1 participant