LearnNewsExamplesServices
Frontmatter
id8084
titleOptimize LivePreview and NeoExecutor container updates by merging remove and add
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 10, 2025, 7:02 PM
updatedAtDec 10, 2025, 7:03 PM
githubUrlhttps://github.com/neomjs/neo/issues/8084
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 10, 2025, 7:03 PM

Optimize LivePreview and NeoExecutor container updates by merging remove and add

Closed v11.17.0 enhancementai
tobiu
tobiu commented on Dec 10, 2025, 7:02 PM

Currently, LivePreview.doRunSource and NeoExecutor.execute call container.removeAll() followed by container.add(). removeAll() triggers a VDOM update (Depth 1 or 2). add() triggers another VDOM update (Depth -1).

This double update is inefficient.

Fix: Change container.removeAll() to container.removeAll(true, true) in both files. The second argument silent=true suppresses the update after removal. The subsequent add() will trigger a full update that includes the cleared state and the new item, merging two updates into one.

tobiu added the enhancement label on Dec 10, 2025, 7:02 PM
tobiu added the ai label on Dec 10, 2025, 7:02 PM
tobiu assigned to @tobiu on Dec 10, 2025, 7:02 PM
tobiu referenced in commit 4020dd5 - "Optimize LivePreview and NeoExecutor container updates by merging remove and add #8084" on Dec 10, 2025, 7:03 PM
tobiu closed this issue on Dec 10, 2025, 7:03 PM