Frontmatter
| id | 8140 |
| title | Implement VDom.getById() and optimize component.Base#onScrollCapture() |
| state | Closed |
| labels | enhancementaiperformancecore |
| assignees | tobiu |
| createdAt | Dec 19, 2025, 10:11 AM |
| updatedAt | Dec 19, 2025, 10:17 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8140 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 19, 2025, 10:17 AM |
Description
To improve performance and maintain consistency with
Neo.util.VNode, we need to implement a dedicatedgetById()method inNeo.util.VDom. The current approach of usingVDom.find(vdom, id)incomponent.Base#onScrollCapture()is slightly more expensive for the hot-path.Tasks
static getById(vdom, id)insrc/util/VDom.mjs.onScrollCapture(data)insrc/component/Base.mjsto useVDomUtil.getById().Rationale
VNodeUtil.getById()is already implemented. AddingVDomUtil.getById()ensures consistency and provides a faster lookup for ID-based searches in the VDOM tree, especially useful in hot-paths like scroll capturing.