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

Context: cleanup - avoid storing a copy of children #2885

Merged
merged 1 commit into from Sep 25, 2022

Conversation

maurerdietmar
Copy link
Contributor

The new changed() signature allows accessing old_props, so there is no more need to store an additional copy of children.

The new changed() signature allows accessing old_props, so
there is no more need to store an additional copy of children.
@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 5dbc933):

https://yew-rs-api--pr2885-cleanup-context-prov-v4so9qbh.web.app

(expires Sun, 02 Oct 2022 07:36:23 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@github-actions
Copy link

Benchmark - SSR

Yew Master

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 318.949 399.686 356.326 26.041
Hello World 10 617.163 741.239 664.355 42.525
Function Router 10 2520.633 2804.855 2617.989 101.348
Concurrent Task 10 1009.337 1014.710 1011.247 1.404

Pull Request

Benchmark Round Min (ms) Max (ms) Mean (ms) Standard Deviation
Baseline 10 404.579 461.390 435.177 18.255
Hello World 10 671.210 830.379 731.246 43.224
Function Router 10 2526.976 3000.499 2723.606 146.573
Concurrent Task 10 1009.389 1011.651 1010.557 0.697

@github-actions
Copy link

Size Comparison

examples master (KB) pull request (KB) diff (KB) diff (%)
boids 170.354 170.352 -0.003 -0.002%
communication_child_to_parent 90.508 90.508 0 0.000%
communication_grandchild_with_grandparent 105.465 105.371 -0.094 -0.089%
communication_grandparent_to_grandchild 101.356 101.260 -0.097 -0.095%
communication_parent_to_child 87.645 87.647 +0.003 +0.003%
contexts 107.888 107.790 -0.098 -0.091%
counter 85.521 85.521 +0.001 +0.001%
counter_functional 86.049 86.050 +0.001 +0.001%
dyn_create_destroy_apps 88.425 88.427 +0.002 +0.002%
file_upload 100.101 100.101 0 0.000%
function_memory_game 163.271 163.260 -0.012 -0.007%
function_router 348.153 347.966 -0.188 -0.054%
function_todomvc 158.063 158.059 -0.005 -0.003%
futures 222.397 222.396 -0.001 -0.000%
game_of_life 105.067 105.067 0 0.000%
immutable 181.739 181.736 -0.003 -0.002%
inner_html 82.388 82.387 -0.001 -0.001%
js_callback 111.419 111.418 -0.001 -0.001%
keyed_list 195.637 195.632 -0.005 -0.002%
mount_point 85.142 85.139 -0.003 -0.003%
nested_list 111.961 111.958 -0.003 -0.003%
node_refs 93.040 93.041 +0.001 +0.001%
password_strength 1548.270 1548.268 -0.002 -0.000%
portals 96.330 96.335 +0.005 +0.005%
router 317.870 317.645 -0.226 -0.071%
simple_ssr 152.245 152.249 +0.004 +0.003%
ssr_router 393.744 393.526 -0.218 -0.055%
suspense 109.150 109.143 -0.008 -0.007%
timer 88.337 88.337 0 0.000%
todomvc 139.156 139.155 -0.001 -0.001%
two_apps 86.135 86.134 -0.001 -0.001%
web_worker_fib 152.450 152.449 -0.001 -0.001%
webgl 84.828 84.828 0 0.000%

✅ None of the examples has changed their size significantly.

Copy link
Member

@futursolo futursolo left a comment

Choose a reason for hiding this comment

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

This pull request also slightly reduces the bundle size.

Thank you for the pull request. LGTM.

@hamza1311 hamza1311 added the A-yew Area: The main yew crate label Sep 25, 2022
Copy link
Member

@hamza1311 hamza1311 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Looks good to me

@hamza1311 hamza1311 merged commit 73d9c04 into yewstack:master Sep 25, 2022
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.

None yet

3 participants