Skip to content

feat(forest): node lifecycle closure, measurable flag, faster traversal - #41

Merged
TtTRz merged 1 commit into
masterfrom
feat/forest-node-lifecycle-and-traversal
Aug 25, 2026
Merged

feat(forest): node lifecycle closure, measurable flag, faster traversal#41
TtTRz merged 1 commit into
masterfrom
feat/forest-node-lifecycle-and-traversal

Conversation

@TtTRz

@TtTRz TtTRz commented Aug 25, 2026

Copy link
Copy Markdown
Member
  • track calc handles set through the CalcHandle style setters and release them via the NodeSetFreeCalcHandle callback on drop; clear surviving children parent pointers to prevent dangling references
  • replace NodeType::Text special-casing with an is_measurable capability flag for measure/baseline cache gating and dirty cache clearing; text nodes remain implicitly measurable, NodeSetMeasurable opts other node kinds in
  • switch the child list from RefCell to UnsafeCell and return a borrowed slice from children(), removing per-call Vec allocation in layout traversal and dirty clearing (about 11x faster full-tree relayout on the 2000-node bench)

- track calc handles set through the CalcHandle style setters and release
  them via the NodeSetFreeCalcHandle callback on drop; clear surviving
  children parent pointers to prevent dangling references
- replace NodeType::Text special-casing with an is_measurable capability
  flag for measure/baseline cache gating and dirty cache clearing; text
  nodes remain implicitly measurable, NodeSetMeasurable opts other node
  kinds in
- switch the child list from RefCell to UnsafeCell and return a borrowed
  slice from children(), removing per-call Vec allocation in layout
  traversal and dirty clearing (about 11x faster full-tree relayout on
  the 2000-node bench)
@TtTRz
TtTRz merged commit fd6671c into master Aug 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant