LearnNewsExamplesServices
Frontmatter
id8836
titleArchitecture: Optimize `vdom.Helper.updateBatch` Response Payload
stateClosed
labels
aiarchitectureperformancecore
assigneestobiu
createdAtJan 20, 2026, 10:00 PM
updatedAtJan 20, 2026, 11:06 PM
githubUrlhttps://github.com/neomjs/neo/issues/8836
authortobiu
commentsCount1
parentIssue8834
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 20, 2026, 11:06 PM

Architecture: Optimize vdom.Helper.updateBatch Response Payload

Closed v11.23.0 aiarchitectureperformancecore
tobiu
tobiu commented on Jan 20, 2026, 10:00 PM

Currently, vdom.Helper.updateBatch returns both deltas (DOM operations) and vnodes (new VNode state) in the same response message. Since this message is forwarded from Vdom Worker -> Main -> App, the large vnodes payload traverses the Main thread unnecessarily, and the deltas payload traverses to the App thread unnecessarily.

Goal: Split the response flow to avoid doubling the payload size.

Proposed Strategy:

  1. Vdom -> Main: Send deltas only. Main consumes them.
  2. Vdom -> App: Send vnodes (results) directly? Or have Main strip deltas before forwarding?
  3. Alternatively, implement VDomUtil.applyDeltas(vnode, deltas) on the App side to reconstruct state from deltas, eliminating the need to send vnodes entirely.

Tasks:

  • Investigate feasibility of applyDeltas for VNode state.
  • Implement payload splitting or reconstruction.
tobiu added the ai label on Jan 20, 2026, 10:00 PM
tobiu added the architecture label on Jan 20, 2026, 10:00 PM
tobiu added the performance label on Jan 20, 2026, 10:00 PM
tobiu added the core label on Jan 20, 2026, 10:00 PM
tobiu added parent issue #8834 on Jan 20, 2026, 10:00 PM
tobiu referenced in commit 8525ee0 - "refactor: Update vdom.Helper.updateBatch to return vnodes Map (#8836) on Jan 20, 2026, 10:01 PM
tobiu assigned to @tobiu on Jan 20, 2026, 10:01 PM
tobiu
tobiu Jan 20, 2026, 10:01 PM

Input from Gemini 3 Pro:

✦ Completed refactoring of updateBatch return signature.

  • Now returns { vnodes: { [id]: vnode } } instead of an array.
  • Updated executeVdomUpdate to consume the map.
  • This prepares for further payload optimizations (e.g. splitting deltas/results).
  • Verified tests pass.
  • Pushed to epic-8834.
tobiu cross-referenced by #8837 on Jan 20, 2026, 10:13 PM
tobiu closed this issue on Jan 20, 2026, 11:06 PM