tracking issue for subtree memoization #39
Labels
breaking
This is a breaking change
core
relating to the core implementation of the virtualdom
enhancement
New feature or request
Projects
A major performance feature of Dioxus is complete elimination of static subtrees. So, subtrees within
rsx!
calls that have no dynamic calls can be "constified" and would be extremely cheap to generate.This means that entirely-static structures like
Would be completely skipped during the diffing process.
We can implement this today but there is some safety considerations to be aware of when hashing these structures. Primarily, if we compare two hashes and the second hash was manually created to be the same as another tree, then we would fail to update call functions for components, leading to missing state/unconnected lifetimes.
You would need to craft these structures intentionally, so it's extremely unlikely for any issue to pop up, but we don't want to directly expose a guaranteed way of causing UB into user code.
The text was updated successfully, but these errors were encountered: