Cache and Invalidation
LayoutCache reduces repeated layout work.
What It Stores
- intrinsic sizes per entity
- dirty flags
- per-depth entity lists
When A Node Becomes Dirty
Whenever one of these changes:
UNodeULayoutUSelf- hierarchy structure
Important exception:
- if the only change is
IntrinsicSizeon a node with children, the cache may ignore it to reduce noise
Lifecycle
track_layout_changesmarks dirty nodesupdate_depth_cacherebuilds the depth map on structural changesupward_measure_pass_cachedreads the cache and clears dirty flags afterward
Performance Diagnostics
- watch
dirty_countanddirty_ratio - enable the profiler overlay when needed