Frontmatter
| id | 9425 |
| title | Refactor Tree cell component architecture for performance |
| state | Closed |
| labels | enhancementrefactoringperformancegrid |
| assignees | tobiu |
| createdAt | Mar 9, 2026, 9:22 PM |
| updatedAt | Mar 9, 2026, 9:23 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9425 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 9404 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 9, 2026, 9:23 PM |
Refactor Tree cell component architecture for performance
tobiu assigned to @tobiu on Mar 9, 2026, 9:22 PM
tobiu added parent issue #9404 on Mar 9, 2026, 9:22 PM

tobiu
Mar 9, 2026, 9:23 PM
Input from Gemini 3.1 Pro:
✦ I have rewritten the Tree cell component to rely purely on the
afterSetRecordhook.
- All redundant state configs (
depth_,expanded_,isLeaf_) have been removed.- VDOM updates (indent style, toggle classes) are now batched into a single method during row recycling.
applyRecordConfigswas simplified to only pass downvalue.Committed and pushed. Closing ticket.
tobiu closed this issue on Mar 9, 2026, 9:23 PM
Goal
To optimize the
Neo.grid.column.component.Treecell component by eliminating redundant state configs and consolidating VDOM updates, improving rendering performance during fast scrolling.Context
The initial implementation of the Tree cell component duplicated record data (
depth,expanded,isLeaf) into separate reactive configs. This resulted in poor performance during row recycling, as updating a single record would trigger multiple consecutiveafterSethooks and redundant VDOMupdate()calls. It also created unnecessary overhead in the parentgrid.column.Treewhich had to manually unpack the record into these configs.Requirements
depth_,expanded_, andisLeaf_fromgrid.column.component.Tree. Therecord_is the single source of truth.afterSetRecordhook, ensuring only oneme.update()is called per recycle.applyRecordConfigsingrid.column.Treeto only pass the extractedvalue, relying on the component to read its own boundrecord.onToggleClickto cleanly access the store viame.parent.gridContainer.