LearnNewsExamplesServices
Frontmatter
id9513
titleOptimize Grid Value Banding (startIndex Support)
stateClosed
labels
enhancementaiperformancegrid
assigneestobiu
createdAtMar 18, 2026, 4:03 PM
updatedAtMar 18, 2026, 4:04 PM
githubUrlhttps://github.com/neomjs/neo/issues/9513
authortobiu
commentsCount0
parentIssue9511
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 18, 2026, 4:04 PM

Optimize Grid Value Banding (startIndex Support)

Closed v12.1.0 enhancementaiperformancegrid
tobiu
tobiu commented on Mar 18, 2026, 4:03 PM

Optimization sub-task for #9511 and #9512 to improve collection.Base calcValueBands for large datasets.

Changes:

  1. Partial Recalculation: calcValueBands now supports an optional startIndex. When passed (e.g. from splice), the algorithm retrieves the banding state from the preceding item and only recalculates for the affected subset of the array.
  2. Sparse Array Support: Added a check for missing items (items[i]) within the calculation loop to prevent crashes when dealing with sparse arrays or buffered data loading.
  3. Map Persistence: The valueBandsMap is no longer fully cleared unless a full recalculation (startIndex === 0) is requested, reducing GC churn.

Verified with existing test suite test/playwright/unit/data/StoreValueBandingCount.spec.mjs.

tobiu added the enhancement label on Mar 18, 2026, 4:03 PM
tobiu added the ai label on Mar 18, 2026, 4:03 PM
tobiu added the performance label on Mar 18, 2026, 4:03 PM
tobiu added the grid label on Mar 18, 2026, 4:03 PM
tobiu added parent issue #9511 on Mar 18, 2026, 4:04 PM
tobiu referenced in commit 9de5ab2 - "perf(collection): Optimize value banding via startIndex support (#9513)" on Mar 18, 2026, 4:04 PM
tobiu assigned to @tobiu on Mar 18, 2026, 4:04 PM
tobiu closed this issue on Mar 18, 2026, 4:04 PM