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

Reuse placeholder nodes on each thread to reduce allocation #2217

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Apr 1, 2024

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

@ealmloff ealmloff added core relating to the core implementation of the virtualdom performance labels Apr 1, 2024
@ealmloff ealmloff marked this pull request as draft April 1, 2024 18:47
@ealmloff ealmloff marked this pull request as ready for review April 1, 2024 18:50
@jkelleyrtp jkelleyrtp merged commit c8140c7 into DioxusLabs:main Apr 2, 2024
17 of 18 checks passed
@ealmloff ealmloff deleted the re-use-placeholder-node branch April 2, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core relating to the core implementation of the virtualdom performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants