Fabric diagnosis lab: render, commit or mount?
Prerequisites: 10-fabric-scheduling
Find the costly phase
Baseline synthesis
Capture a slow interaction and note JS render work, layout/commit pressure and UI-thread host mutations. Fabric’s tree model explains why these costs need separate observation.
[S05] [S06] [S14]Proposed experiment synthesis
If repeated React updates create needless work, reduce them. If a custom host view blocks main, reduce work in its prop update or move non-UI processing off main. Compare dropped frames and latency on the same device.
[S05] [S06]Trade-off synthesis
Aggressive batching may delay feedback; native offloading introduces synchronization and resource ownership. Choose a change based on the interaction’s latency target.
[S05] [S06]Pitfall synthesis
Optimizing shadow-node count from a single screenshot can miss the scroll or animation path. Trace a representative sequence and repeat after the change.
[S05] [S14]Check yourself: Would memoizing a React component fix a UI-thread mount bottleneck?
Only if it reduces the relevant host changes; first confirm that unnecessary React updates are driving the mount work.