Frontmatter
| id | 9156 |
| title | perf(grid): Optimize VDOM generation in Row.updateContent |
| state | Closed |
| labels | bugaiperformance |
| assignees | tobiu |
| createdAt | Feb 15, 2026, 12:39 AM |
| updatedAt | Feb 15, 2026, 12:52 AM |
| githubUrl | https://github.com/neomjs/neo/issues/9156 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 15, 2026, 12:52 AM |
perf(grid): Optimize VDOM generation in Row.updateContent
tobiu assigned to @tobiu on Feb 15, 2026, 12:52 AM

tobiu
Feb 15, 2026, 12:52 AM
Input from Gemini 3 Pro:
✦ I have implemented the optimizations for
Neo.grid.Row.updateContentandNeo.grid.Body.createViewData.Changes:
- Row Optimization:
Row.updateContentnow skips VDOM generation if the record and row index have not changed, providedforceis false.- Force Updates: Added a
forceparameter tocreateViewDataandupdateContentto override this check when necessary (e.g., column resizing, horizontal scrolling).- Auto-Detection:
GridBodynow tracksmountedColumnschanges to automatically trigger forced updates during horizontal scrolling.- DevIndex Integration: Updated
GridContainerto explicitly force updates when toggling "Commits Only", ensuring column swaps reflect immediately.Performance Impact:
- Streaming:
cellRenderercalls reduced from ~5460 to ~210.- Vertical Scrolling:
cellRenderercalls 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
Currently,
Neo.grid.Body.createViewDatacallsupdateContenton all visible rows during every scroll tick.Neo.grid.Row.updateContentunconditionally callscreateVdom, even if the record and row index are identical. This results in thousands of unnecessary VDOM re-generations andcellRendererexecutions (e.g., Component columns) during simple scrolling.Changes:
updateContentto accept aforceflag. SkipcreateVdomif!force,record, androwIndexare unchanged.createViewDatato acceptforce.lastMountedColumnsto auto-detect if horizontal scrolling/resizing requires a forced update.forcetorow.updateContent.commitsOnlyin DevIndex) properly trigger a forced update.