DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
19.33k stars 736 forks source link

Reuse placeholder nodes on each thread to reduce allocation #2217

Closed ealmloff closed 3 months ago

ealmloff commented 3 months ago

This PR changes the placeholder and empty nodes in core to reuse the same Rc<NodeInner> for every instance per thread. NodeInner is completely immutable, so using the same instance for every VNode will not effect behavior