Closed
Description
ReactMount caches all children for each parent it visits, this avoids worst-case exponential cost. However, use of ReactDOMIDOperations for updates forces ReactMount to populate the cache with the previous children.
If a newly rendered node needs to be found, then "the children of the parent" of "the newly rendered root" has to be re-traversed as it does not exist in the node cache. Since it's guaranteed that all the siblings of newly rendered roots are cached and that we have a reference to the node, it's trivial to manually add it to the node cache which should avoid "double-traversals" entirely.
Activity