Measure before moving work native
Prerequisites: 06-thread-ownership, 07-events-and-lifecycle
Measure before moving work native — mechanism
Mental model verified
A slow screen may be caused by JS computation, too many renders, layout, UI-thread work, image decoding or native callback volume. JSI reduces one class of overhead but is not a universal performance fix. Hermes behavior and profiling should be judged in release builds.
[S01] [S10] [S12]Worked example synthesis
If a camera overlay stutters, record JS and UI frame behavior, event frequency and payload size. Try lower event cadence or native aggregation first; compare the same device and scenario after each change.
[S07] [S12]Engineering choice synthesis
Set a target interaction and trace a real flow. Change one bottleneck at a time; record median and tail latency, dropped frames and memory on representative Android and iOS devices. These are proposed measurements, not claimed results.
[S01] [S12]Pitfall and next step synthesis
A microbenchmark for module calls can miss image conversion, native SDK work and React rerender cost. Validate the user-visible result and watch for regressions in startup, battery or memory.
[S01] [S10] [S12]Check yourself: What evidence would support moving a per-frame calculation to native?
A release-build trace showing repeated boundary or JS work hurting the target frame budget, plus an improved end-to-end measurement after a prototype.