-
-
Notifications
You must be signed in to change notification settings - Fork 202
Implement Hybrid Cell Buffering (Pooling) for Grid Rows #8992
Copy link
Copy link
Closed
Labels
aienhancementNew feature or requestNew feature or requestperformancePerformance improvements and optimizationsPerformance improvements and optimizations
Description
Problem
The current Neo.grid.Row implementation generates cell IDs based on the column dataField. During horizontal scrolling, this causes DOM nodes to be destroyed and created as they enter/exit the viewport.
This constant allocation/deallocation creates memory pressure (GC pauses) during rapid scrolling.
Solution: Hybrid Cell Pooling
Implement a pooling strategy to reuse cell containers.
1. Pooled Cells (Recycled)
- Target: Columns with
hideMode: 'removeDom'. - Mechanism: Fixed pool of cell containers (IDs:
...__cell-0,...__cell-1). - Behavior: Recycle cells by updating
style.left,cls, and content. - Impact on Child Nodes:
- Text/Homogeneous Content: If the new column has the same structure (e.g. plain text or same HTML structure), the inner nodes are also reused/updated. Zero GC.
- Heterogeneous Content: If the new column has a different structure, the inner nodes will be swapped by the VDOM engine. We still save the allocation of the heavy Cell Container (
div.neo-grid-cell) and its layout positioning.
2. Permanent Cells (Stateful)
- Target: Columns with
hideMode: 'visibility'(e.g., Sparklines). - Mechanism: Keep data-bound IDs (
...__firstname). - Behavior: Persist in DOM; toggle visibility.
Implementation Details
Neo.grid.Body: ImplementgetCellId(rowIndex, dataField)to handle pooled/permanent lookups.Neo.grid.Row: RefactorcreateVdomfor the hybrid pass.
Goal
Eliminate GC-induced micro-stutters by ensuring O(1) stability for the Grid Structure (Cell Containers).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
aienhancementNew feature or requestNew feature or requestperformancePerformance improvements and optimizationsPerformance improvements and optimizations