LearnNewsExamplesServices
Frontmatter
id1123
titlevdom.Helper: update() => performance
stateClosed
labels
enhancementstale
assigneestobiu
createdAtAug 21, 2020, 8:53 PM
updatedAtSep 27, 2024, 4:34 AM
githubUrlhttps://github.com/neomjs/neo/issues/1123
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtSep 27, 2024, 4:34 AM

vdom.Helper: update() => performance

Closed v8.1.0 enhancementstale
tobiu
tobiu commented on Aug 21, 2020, 8:53 PM

I think we can further increase the performance, in case we add a map for the new & old vnode trees.

object keys with the structure:

ìd: {vnode, parentId, parentIndex, parentVnode}

(parentId is a bit redundant (same as parentVnode.id)).

This way we would ensure, that vnode trees only get recursively parsed 3 times

  1. creating the map: new tree
  2. creating the map: old tree
  3. dynamically parsing the new tree

right now, there are additional sub tree parsings in place (to find moved nodes).

tobiu added the enhancement label on Aug 21, 2020, 8:53 PM
tobiu assigned to @tobiu on Aug 21, 2020, 8:53 PM