Repository navigation
Re-link only parents whose child list changed - #94
Conversation
Every publication removed the Yoga children of every owned node and inserted them again. That marks the whole layout dirty, so the frame after a commit laid out the whole tree again, even when one row changed. A parent is now re-linked only when its child list changed, it is new to the publication, or it is being destroyed. Moved children still leave a parent whose list changed or a destroyed one before being attached. Measured through xframes-core (xframes-project/xframes-core#21), one changed row per commit, hidden window: the frame after a commit at 2,000 rows (8,001 nodes) went from 168.5 ms to 12.5 ms, which is what a frame without a commit costs. The protocol, validation and receipts are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0186WhMU3KjnmjR7Y4r49GrT
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The xframes submodule now tracks main. The core/virtual-table branch was merged there (xframes-project/xframes#93), followed by a fix that re-links only the parents whose child list changed (xframes-project/xframes#94). The frame after a commit no longer lays out the whole tree: at 8,001 nodes it went from 168.5 ms to 12.5 ms in xframes-core's measurement (xframes-project/xframes-core#21). The C ABI is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0186WhMU3KjnmjR7Y4r49GrT
Every publication called
YGNodeRemoveAllChildrenon every owned node and re-inserted every child, so the frame after any commit laid out the whole tree again. This re-links a parent only when its child list changed, it is new, or it is being destroyed. The commit protocol, validation and receipts are unchanged.Measured through xframes-core (xframes-project/xframes-core#21), one changed row per commit, hidden window, medians of 15 commits:
New test:
PublicationRelinksOnlyParentsWhoseChildrenChangedchecks that a sibling subtree whose children did not change keeps a clean Yoga layout. The existing reorder, move and removal tests cover moved children. xframes-core's native and rendered checks pass against a library built with this change.🤖 Generated with Claude Code
https://claude.ai/code/session_0186WhMU3KjnmjR7Y4r49GrT
Summary by CodeRabbit