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

Namespace support for VRaw. #3640

Merged
merged 11 commits into from May 10, 2024
Merged

Conversation

finnbear
Copy link
Contributor

@finnbear finnbear commented Mar 23, 2024

Description

Fixes #3641

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

Checklist

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

Unanswered questions

  • Should it support any namespace URI or just SVG and MathML? (currently the latter)

Copy link

github-actions bot commented Mar 23, 2024

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

Copy link

github-actions bot commented Mar 23, 2024

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.

Copy link

github-actions bot commented Mar 23, 2024

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

Copy link

github-actions bot commented Mar 23, 2024

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 🌎

@finnbear finnbear marked this pull request as ready for review March 23, 2024 17:43
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.

CI failures look unrelated, thanks for the PR

Copy link
Member

@WorldSEnder WorldSEnder left a comment

Choose a reason for hiding this comment

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

Looks clean to me. At some point we should think about internally passing down the namespace instead of grabbing it again by interacting with the DOM but I would need to convinced that it's considerable overhead first.

@WorldSEnder WorldSEnder merged commit dbdd3b7 into yewstack:master May 10, 2024
19 of 22 checks passed
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.

VRaw namespace support for svg contents.
3 participants