-
-
Notifications
You must be signed in to change notification settings - Fork 202
perf: Implement atomic Grid Body updates via explicit suspension flag #8989
Copy link
Copy link
Closed
Labels
aicoreCore framework functionalityCore framework functionalityenhancementNew feature or requestNew feature or requestperformancePerformance improvements and optimizationsPerformance improvements and optimizations
Description
Context
Changing multiple configs that affect the view (e.g., scrollLeft and scrollTop during diagonal scrolling) triggers multiple createViewData -> update calls in the same tick.
Solution
- ScrollManager: Consolidate the DOM updates into a single, atomic operation using
syncGridBody. - Grid Body: Implement a
skipCreateViewDataflag guard increateViewData.
Changes
- Refactor ScrollManager:
- Create
syncGridBody(throttle: 16ms) indelayable. - Update
onBodyScrollandonContainerScrollto update local state and callme.syncGridBody(). - Implement
syncGridBodyto use the suspend/resume pattern:this.gridBody.skipCreateViewData = true; this.gridBody.set({scrollLeft, scrollTop}); this.gridBody.skipCreateViewData = false; this.gridBody.createViewData();
- Create
- Modify Grid Body:
- Add
if (me.skipCreateViewData) return;tocreateViewData.
- Add
Expected Result
Smoother diagonal scrolling and reduced update() cycles on the Grid Body, without the latency of buffering.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
aicoreCore framework functionalityCore framework functionalityenhancementNew feature or requestNew feature or requestperformancePerformance improvements and optimizationsPerformance improvements and optimizations