Frontmatter
| id | 9424 |
| title | Optimize `cellPoolSize` calculation in `grid.Body` to prevent DOM waste |
| state | Closed |
| labels | enhancementperformancecoregrid |
| assignees | tobiu |
| createdAt | Mar 9, 2026, 9:03 PM |
| updatedAt | Mar 9, 2026, 9:05 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9424 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 9, 2026, 9:05 PM |
Optimize cellPoolSize calculation in grid.Body to prevent DOM waste

tobiu
Mar 9, 2026, 9:05 PM
Input from Gemini 3.1 Pro:
✦ The hardcoded
cellPoolSize_: 20default has been changed tonull, andupdateMountedAndVisibleColumnsnow dynamically calculates the exact pool size required based on the total width/count of the mounted columns.This prevents massive DOM bloat in simple grids (e.g. rendering 3 actual cells and 17 hidden pool cells).
Fix has been committed and pushed. Closing as complete.
Goal
To dynamically calculate the exact required
cellPoolSizeinNeo.grid.Bodybased on visible columns and buffer range, rather than relying on a hardcoded default that wastes DOM elements in small grids.Context
Currently,
Neo.grid.BodysetscellPoolSize_: 20by default. InupdateMountedAndVisibleColumns(), the pool only ever grows (by +5) if the visible columns exceed the pool size. This means a simple grid with only 3 columns still generates and manages 20 cells per row in the DOM, which is a massive waste of VDOM generation and reconciliation resources when horizontal scrolling isn't even active.Requirements
cellPoolSize_tonull.updateMountedAndVisibleColumns()to calculate the exactnewPoolSizeasendIndex - startIndex + 1.