yewstack / yew

Rust / Wasm framework for creating reliable and efficient web applications
https://yew.rs
Apache License 2.0
30.23k stars 1.41k forks source link

Namespace support for `VRaw`. #3640

Closed finnbear closed 1 month ago

finnbear commented 3 months ago

Description

Fixes #3641

When attaching Html to DOM, create the temporary parent with the same namespaceURI as the actual parent.

Checklist

Unanswered questions

github-actions[bot] commented 3 months ago

Benchmark - core

Yew Master

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.778 ns      │ 3.085 ns      │ 2.78 ns       │ 2.79 ns       │ 100     │ 1000000000

Pull Request

vnode           fastest       │ slowest       │ median        │ mean          │ samples │ iters
╰─ vnode_clone  2.78 ns       │ 3.883 ns      │ 2.786 ns      │ 2.824 ns      │ 100     │ 1000000000
github-actions[bot] commented 3 months ago

Size Comparison

| examples | master (KB) | pull request (KB) | diff (KB) | diff (%) | | --- | --- | --- | --- | --- | | async_clock | 99.055 | 99.211 | +0.156 | +0.158% | | boids | 171.354 | 171.510 | +0.156 | +0.091% | | communication_child_to_parent | 91.659 | 91.815 | +0.156 | +0.170% | | communication_grandchild_with_grandparent | 103.843 | 103.999 | +0.156 | +0.150% | | communication_grandparent_to_grandchild | 99.231 | 99.388 | +0.156 | +0.157% | | communication_parent_to_child | 87.967 | 88.123 | +0.156 | +0.178% | | contexts | 103.883 | 104.039 | +0.156 | +0.150% | | counter | 84.934 | 85.090 | +0.156 | +0.184% | | counter_functional | 85.044 | 85.200 | +0.156 | +0.184% | | dyn_create_destroy_apps | 87.961 | 88.117 | +0.156 | +0.178% | | file_upload | 98.929 | 99.085 | +0.156 | +0.158% | | function_memory_game | 169.583 | 169.739 | +0.156 | +0.092% | | function_router | 346.040 | 346.196 | +0.156 | +0.045% | | function_todomvc | 159.789 | 159.945 | +0.156 | +0.098% | | futures | 227.340 | 227.496 | +0.156 | +0.069% | | game_of_life | 108.610 | 108.767 | +0.156 | +0.144% | | immutable | 188.712 | 188.874 | +0.162 | +0.086% | | inner_html | 78.769 | 78.925 | +0.156 | +0.198% | | js_callback | 107.300 | 107.456 | +0.156 | +0.146% | | keyed_list | 196.929 | 197.085 | +0.156 | +0.079% | | mount_point | 81.636 | 81.792 | +0.156 | +0.191% | | nested_list | 112.662 | 112.818 | +0.156 | +0.139% | | node_refs | 89.160 | 89.316 | +0.156 | +0.175% | | password_strength | 1708.335 | 1708.491 | +0.156 | +0.009% | | portals | 92.134 | 92.290 | +0.156 | +0.170% | | router | 315.350 | 315.506 | +0.156 | +0.050% | | simple_ssr | 139.161 | 139.317 | +0.156 | +0.112% | | ssr_router | 383.532 | 383.688 | +0.156 | +0.041% | | suspense | 113.971 | 114.127 | +0.156 | +0.137% | | timer | 87.448 | 87.604 | +0.156 | +0.179% | | timer_functional | 96.275 | 96.432 | +0.156 | +0.162% | | todomvc | 140.618 | 140.774 | +0.156 | +0.111% | | two_apps | 84.328 | 84.484 | +0.156 | +0.185% | | web_worker_fib | 133.975 | 134.131 | +0.156 | +0.117% | | web_worker_prime | 184.139 | 184.295 | +0.156 | +0.085% | | webgl | 81.453 | 81.609 | +0.156 | +0.192% |

✅ None of the examples has changed their size significantly.

github-actions[bot] commented 3 months ago

Benchmark - SSR

Yew Master

| Benchmark | Round | Min (ms) | Max (ms) | Mean (ms) | Standard Deviation | | --- | --- | --- | --- | --- | --- | | Baseline | 10 | 308.901 | 309.893 | 309.195 | 0.340 | | Hello World | 10 | 481.723 | 496.683 | 488.921 | 5.350 | | Function Router | 10 | 1628.759 | 1643.735 | 1635.934 | 4.133 | | Concurrent Task | 10 | 1005.890 | 1007.398 | 1006.507 | 0.456 | | Many Providers | 10 | 1110.003 | 1145.914 | 1131.671 | 11.679 |

Pull Request

| Benchmark | Round | Min (ms) | Max (ms) | Mean (ms) | Standard Deviation | | --- | --- | --- | --- | --- | --- | | Baseline | 10 | 308.894 | 309.926 | 309.223 | 0.318 | | Hello World | 10 | 540.383 | 547.241 | 543.922 | 1.900 | | Function Router | 10 | 1705.551 | 1767.536 | 1717.450 | 18.550 | | Concurrent Task | 10 | 1005.412 | 1007.281 | 1006.338 | 0.626 | | Many Providers | 10 | 1119.909 | 1168.880 | 1132.045 | 16.163 |
github-actions[bot] commented 3 months ago

Visit the preview URL for this PR (updated for commit 5073e33):

https://yew-rs-api--pr3640-3639-vraw-namespace-hmd5u4yn.web.app

(expires Sat, 30 Mar 2024 17:41:31 GMT)

🔥 via Firebase Hosting GitHub Action 🌎