Observe the Spineless layout engine: returns the latest LayoutTrace,
a bounded recent history, and cumulative per-path totals.
The hook registers a @pilates/core profiler listener on mount and
clears it on unmount. setLayoutProfiler is a single global slot —
use oneuseLayoutProfiler (or one <LayoutDevtools>) per app.
The hook does NOT self-trigger re-renders: a profiler's state changes
on every layout, so a post-commit force would loop forever. It
returns the accumulated state on every render the consumer drives;
the panel is thus one completed layout behind — imperceptible in an
interactive app, which re-renders to produce the layouts profiled.
Observe the Spineless layout engine: returns the latest
LayoutTrace, a bounded recent history, and cumulative per-path totals.The hook registers a
@pilates/coreprofiler listener on mount and clears it on unmount.setLayoutProfileris a single global slot — use oneuseLayoutProfiler(or one<LayoutDevtools>) per app.The hook does NOT self-trigger re-renders: a profiler's state changes on every layout, so a post-commit force would loop forever. It returns the accumulated state on every render the consumer drives; the panel is thus one completed layout behind — imperceptible in an interactive app, which re-renders to produce the layouts profiled.