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

Fix top-level reconciliation in portals #3020

Merged
merged 1 commit into from
Dec 10, 2022

Conversation

WorldSEnder
Copy link
Member

Description

Portals would incorrectly use their own parent and next_sibling to reconcile their contents since #2330. Oops. This did not affect the reconciliation of nested elements, which could be a reason this was undetected for this long.

Fixes #3017

A workaround for anyone impacted by this (until the next patch release) would be to nest elements in a tag that does not change, which is not applicable in all situations.

Checklist

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

@WorldSEnder WorldSEnder added the A-yew Area: The main yew crate label Dec 6, 2022
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

Visit the preview URL for this PR (updated for commit 88386fb):

https://yew-rs-api--pr3020-fix-portal-reconcili-gp292iyx.web.app

(expires Tue, 13 Dec 2022 07:49:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

github-actions bot commented Dec 6, 2022

Benchmark - SSR

Yew Master

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 393.409 400.734 395.705 2.520
Hello World 10 667.470 672.130 669.180 1.789
Function Router 10 2286.115 2306.709 2296.136 6.430
Concurrent Task 10 1007.457 1008.770 1008.297 0.413

Pull Request

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 371.733 377.080 373.196 2.179
Hello World 10 698.297 705.654 701.892 2.101
Function Router 10 2368.084 2407.252 2391.073 10.844
Concurrent Task 10 1007.672 1008.605 1008.236 0.336

@github-actions
Copy link

github-actions bot commented Dec 6, 2022

Size Comparison

examples master (KB) pull request (KB) diff (KB) diff (%)
async_clock 108.294 108.303 +0.009 +0.008%
boids 172.371 172.374 +0.003 +0.002%
communication_child_to_parent 92.446 92.455 +0.009 +0.010%
communication_grandchild_with_grandparent 106.919 106.927 +0.008 +0.007%
communication_grandparent_to_grandchild 102.770 102.789 +0.020 +0.019%
communication_parent_to_child 89.534 89.545 +0.011 +0.012%
contexts 109.482 109.493 +0.011 +0.010%
counter 87.450 87.459 +0.009 +0.010%
counter_functional 87.865 87.873 +0.008 +0.009%
dyn_create_destroy_apps 90.300 90.311 +0.011 +0.012%
file_upload 101.769 101.777 +0.009 +0.009%
function_memory_game 165.375 165.388 +0.013 +0.008%
function_router 350.312 350.329 +0.017 +0.005%
function_todomvc 160.078 160.089 +0.011 +0.007%
futures 224.488 224.496 +0.008 +0.003%
game_of_life 107.059 107.066 +0.008 +0.007%
immutable 184.155 184.163 +0.008 +0.004%
inner_html 83.870 83.878 +0.008 +0.009%
js_callback 113.158 113.162 +0.004 +0.003%
keyed_list 197.892 197.899 +0.008 +0.004%
mount_point 87.017 87.024 +0.008 +0.009%
nested_list 114.014 114.021 +0.008 +0.007%
node_refs 94.960 94.968 +0.008 +0.008%
password_strength 1553.435 1553.442 +0.008 +0.001%
portals 98.232 98.240 +0.008 +0.008%
router 320.461 320.457 -0.004 -0.001%
simple_ssr 153.133 153.142 +0.009 +0.006%
ssr_router 394.648 394.672 +0.023 +0.006%
suspense 110.766 110.762 -0.004 -0.004%
timer 90.319 90.326 +0.007 +0.008%
todomvc 141.357 141.364 +0.007 +0.005%
two_apps 88.073 88.082 +0.009 +0.010%
web_worker_fib 154.445 154.453 +0.008 +0.005%
webgl 86.569 86.578 +0.009 +0.010%

✅ None of the examples has changed their size significantly.

Copy link
Member

@ranile ranile left a comment

Choose a reason for hiding this comment

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

👍

Seems like we should cut a new patch release soon

@WorldSEnder WorldSEnder merged commit d7f9880 into yewstack:master Dec 10, 2022
WorldSEnder added a commit to WorldSEnder/yew that referenced this pull request Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew Area: The main yew crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replacing elements inside a portal causes a panic
2 participants