Frontmatter
| id | 8084 |
| title | Optimize LivePreview and NeoExecutor container updates by merging remove and add |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Dec 10, 2025, 7:02 PM |
| updatedAt | Dec 10, 2025, 7:03 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8084 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 10, 2025, 7:03 PM |
Currently,
LivePreview.doRunSourceandNeoExecutor.executecallcontainer.removeAll()followed bycontainer.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()tocontainer.removeAll(true, true)in both files. The second argumentsilent=truesuppresses the update after removal. The subsequentadd()will trigger a full update that includes the cleared state and the new item, merging two updates into one.