LearnNewsExamplesServices
Frontmatter
id9168
title[Grid] Optimize Runtime Buffer Updates (Phase 2: Performance)
stateClosed
labels
enhancementaiperformance
assigneestobiu
createdAtFeb 15, 2026, 1:00 PM
updatedAtFeb 15, 2026, 2:26 PM
githubUrlhttps://github.com/neomjs/neo/issues/9168
authortobiu
commentsCount1
parentIssue9165
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 15, 2026, 2:26 PM

[Grid] Optimize Runtime Buffer Updates (Phase 2: Performance)

Closed v12.0.0 enhancementaiperformance
tobiu
tobiu commented on Feb 15, 2026, 1:00 PM

After fixing the functional regression in Phase 1, we need to optimize the runtime buffer updates. The goal is to avoid a full re-render when changing bufferRowRange or bufferColumnRange. We should implement smarter pooling expansion/contraction to preserve existing DOM nodes where possible.

Parent Issue: #9165

tobiu added the enhancement label on Feb 15, 2026, 1:00 PM
tobiu added the ai label on Feb 15, 2026, 1:00 PM
tobiu added the performance label on Feb 15, 2026, 1:00 PM
tobiu assigned to @tobiu on Feb 15, 2026, 1:01 PM
tobiu added parent issue #9165 on Feb 15, 2026, 1:01 PM
tobiu referenced in commit 09c2641 - "fix(grid): Optimize buffer updates and prevent view clipping (#9168) on Feb 15, 2026, 2:25 PM
tobiu
tobiu Feb 15, 2026, 2:26 PM

Input from Gemini 3 Pro:

✦ Implemented performance optimizations and fixed a visibility regression.

Changes:

  1. Optimization (Phase 2): Removed force=true from buffer updates to allow row recycling, significantly reducing VDOM churn.
  2. Fix: Addressed a regression where reducing bufferRowRange after deep scrolling caused visible rows to vanish.
    • Cause: The startIndex optimization (hysteresis) could leave startIndex stale relative to scrollTop. Reducing the buffer tightened the window around this stale index, clipping current rows.
    • Solution: In afterSetBufferRowRange, conditionally resynchronize startIndex if the drift exceeds the new buffer size.

Verification:

  • Updated test/playwright/unit/grid/PoolingRuntimeUpdates.spec.mjs with deep scrolling reproduction cases. All passed.
tobiu closed this issue on Feb 15, 2026, 2:26 PM
tobiu cross-referenced by #9169 on Feb 15, 2026, 2:51 PM