LearnNewsExamplesServices
Frontmatter
id5548
titlevdom.Helper: createDeltas() => removeAll OP
stateClosed
labels
enhancement
assigneestobiu
createdAtJul 9, 2024, 7:26 PM
updatedAtJul 9, 2024, 11:09 PM
githubUrlhttps://github.com/neomjs/neo/issues/5548
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJul 9, 2024, 11:09 PM

vdom.Helper: createDeltas() => removeAll OP

Closed v8.1.0 enhancement
tobiu
tobiu commented on Jul 9, 2024, 7:26 PM

The following conditions need to be true:

  1. The new vnode.childNodes array must be empty
  2. The oldVnode.childNodes array must have more than one item
  3. None of the oldVnode.childNodes items does exist inside the new vnode tree (map check)

If all 3 conditions match, we can replace all single removeNode deltas with a single removeAll delta.

To do this, we need to store all remove deltas of the current method call (non-recursively) and replace them as needed.

tobiu added the enhancement label on Jul 9, 2024, 7:26 PM
tobiu
tobiu Jul 9, 2024, 10:42 PM

thinking more about this one: we do not even need the check if a node did get moved, since we longer have a direct call to remove it => other OPs can still pull it out as needed.

will give it a try.

tobiu assigned to @tobiu on Jul 9, 2024, 10:42 PM
tobiu referenced in commit 63d4460 - "vdom.Helper: createDeltas() => removeAll OP #5548" on Jul 9, 2024, 11:08 PM
tobiu closed this issue on Jul 9, 2024, 11:09 PM
tobiu referenced in commit 94afeec - "#5548 wrapper test comment" on Jul 9, 2024, 11:12 PM