Skip to content

perf(grid): Optimize Horizontal Scrolling (Cell Recycling) #9157

@tobiu

Description

@tobiu

Currently, horizontal scrolling in the Grid forces a full re-render of all visible cells (createViewData(force=true)).
This is because Neo.grid.Body detects a change in mountedColumns and triggers a forced update for all rows.
This results in O(N*M) operations (N rows * M columns) even for a 1-column scroll delta.

Optimization Goal:
Implement "Cell Recycling" or efficient DOM updates for horizontal scrolling, similar to how Row Pooling works for vertical scrolling.
Only the cells entering/leaving the viewport (or updating content) should be re-rendered.

Tasks:

  1. Analyze Neo.grid.Row.createVdom to see if we can selectively update cells instead of rebuilding the entire cn array.
  2. Investigate if we can detect the direction of the scroll and only update the leading/trailing edges of the pooled cells.
  3. Ensure component based columns are properly recycled/moved.

Metadata

Metadata

Assignees

Labels

aienhancementNew feature or requestperformancePerformance improvements and optimizations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions