-
-
Notifications
You must be signed in to change notification settings - Fork 202
Optimization: Record Versioning & Component Column Short-Circuit #9200
Copy link
Copy link
Closed
Labels
coreCore framework functionalityCore framework functionalityenhancementNew feature or requestNew feature or requestperformancePerformance improvements and optimizationsPerformance improvements and optimizations
Description
Objective
Implement a "Record Versioning" mechanism to allow Neo.grid.column.Component to short-circuit redundant updates during rendering, optimizing horizontal scrolling and grid updates.
Motivation
In Neo.grid.Row pooling, component instances are reused. When a row recycles (or during horizontal scroll when a column re-appears), cellRenderer is called, which triggers component.set(config). Even if the record hasn't changed, this often triggers VDOM updates because config objects (like arrays for sparklines) are new references.
Implementation Plan
-
Neo.data.RecordFactory:- Add a
_version(integer) property to the generated Record class. - Increment
_versioninsidesetRecordFieldswhenever a field actually changes. - Expose a
versiongetter.
- Add a
-
Neo.grid.column.Component:- In
cellRenderer, check if an existingcomponentinstance is being reused. - Short-Circuit Condition: If
component[recordProperty] === recordANDrecord.version === component.lastRecordVersion. - If condition met: Return early (skip
component.set()). - Else: Proceed with update and store
component.lastRecordVersion = record.version.
- In
Expected Impact
Significant reduction in scripting time during horizontal scrolling and redundant store updates, especially for grids with complex component columns.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreCore framework functionalityCore framework functionalityenhancementNew feature or requestNew feature or requestperformancePerformance improvements and optimizationsPerformance improvements and optimizations