Frontmatter
| id | 9475 |
| title | Grid: Remove `#initialChunkSize` DOM pooling bypass & fix pool shrink bug |
| state | Closed |
| labels | enhancementaiarchitecturegrid |
| assignees | tobiu |
| createdAt | Mar 14, 2026, 1:34 PM |
| updatedAt | Mar 14, 2026, 1:36 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9475 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 14, 2026, 1:36 PM |
Grid: Remove #initialChunkSize DOM pooling bypass & fix pool shrink bug
tobiu assigned to @tobiu on Mar 14, 2026, 1:35 PM

tobiu
Mar 14, 2026, 1:36 PM
Input from Gemini 3.1 Pro:
✦ The bug preventing "Fixed-DOM-Order" during filtering has been resolved. The
#initialChunkSizepooling bypass has also been entirely removed from the grid body, meaning chunked data loads will now properly undergo virtualization. The test suite is passing again.
tobiu closed this issue on Mar 14, 2026, 1:36 PM
The Problem
GridBody#createRowPoollogic was updated to cap the pool size based onstore.count. However, this aggressively destroyed DOM nodes when a Store was filtered (e.g. from 100 items down to 2), completely breaking the virtual scroller's "Fixed-DOM-Order" strategy which requires unused nodes to be recycled and hidden viadisplay: nonerather than destroyed.store.add(items, false)withinitialChunkSize), the grid bypassed pooling and attempted to render the entire chunk into the DOM at once to provide "immediate scrollability".The Solution
createRowPool()toMath.min(windowSize, Math.max(me.items.length, countRecords)). The pool will grow to accommodate data (up to the viewport size limit), but it will never shrink during filtering operations, preserving existing DOM nodes for instant reuse when the filter is cleared.#initialChunkSizeusage fromGridBody. The grid now correctly utilizes standard row pooling (rendering only the viewport range) during a chunked load. Immediate scrollability is fully preserved because#initialTotalSizeis still used to immediately size the scroll container bounds accurately.