LearnNewsExamplesServices
Frontmatter
id9156
titleperf(grid): Optimize VDOM generation in Row.updateContent
stateClosed
labels
bugaiperformance
assigneestobiu
createdAtFeb 15, 2026, 12:39 AM
updatedAtFeb 15, 2026, 12:52 AM
githubUrlhttps://github.com/neomjs/neo/issues/9156
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 15, 2026, 12:52 AM

perf(grid): Optimize VDOM generation in Row.updateContent

Closed v12.0.0 bugaiperformance
tobiu
tobiu commented on Feb 15, 2026, 12:39 AM

Currently, Neo.grid.Body.createViewData calls updateContent on all visible rows during every scroll tick. Neo.grid.Row.updateContent unconditionally calls createVdom, even if the record and row index are identical. This results in thousands of unnecessary VDOM re-generations and cellRenderer executions (e.g., Component columns) during simple scrolling.

Changes:

  1. Neo.grid.Row: Update updateContent to accept a force flag. Skip createVdom if !force, record, and rowIndex are unchanged.
  2. Neo.grid.Body:
    • Update createViewData to accept force.
    • Track lastMountedColumns to auto-detect if horizontal scrolling/resizing requires a forced update.
    • Pass force to row.updateContent.
  3. Review Triggers: Ensure other config changes (like commitsOnly in DevIndex) properly trigger a forced update.
tobiu added the bug label on Feb 15, 2026, 12:39 AM
tobiu added the ai label on Feb 15, 2026, 12:39 AM
tobiu added the performance label on Feb 15, 2026, 12:39 AM
tobiu referenced in commit 0a43dba - "perf(grid): Optimize VDOM generation in Row.updateContent (#9156)" on Feb 15, 2026, 12:52 AM
tobiu assigned to @tobiu on Feb 15, 2026, 12:52 AM
tobiu
tobiu Feb 15, 2026, 12:52 AM

Input from Gemini 3 Pro:

✦ I have implemented the optimizations for Neo.grid.Row.updateContent and Neo.grid.Body.createViewData.

Changes:

  1. Row Optimization: Row.updateContent now skips VDOM generation if the record and row index have not changed, provided force is false.
  2. Force Updates: Added a force parameter to createViewData and updateContent to override this check when necessary (e.g., column resizing, horizontal scrolling).
  3. Auto-Detection: GridBody now tracks mountedColumns changes to automatically trigger forced updates during horizontal scrolling.
  4. DevIndex Integration: Updated GridContainer to explicitly force updates when toggling "Commits Only", ensuring column swaps reflect immediately.

Performance Impact:

  • Streaming: cellRenderer calls reduced from ~5460 to ~210.
  • Vertical Scrolling: cellRenderer calls reduced from ~7000 to ~30 (only new rows).

I am closing this ticket as the primary optimization is complete. Horizontal scrolling optimization will be tracked separately.

tobiu closed this issue on Feb 15, 2026, 12:52 AM
tobiu cross-referenced by #9158 on Feb 15, 2026, 1:32 AM