Hermes diagnosis lab: startup, long tasks and heap
Prerequisites: 09-hermes-memory
Performance hypothesis loop
Baseline verified
Record cold start, first useful screen, JS execution and memory in comparable release builds. React Native DevTools traces and heap snapshots explain JS behavior; Android Studio and Xcode explain native paths.
[S01] [S14]Proposed experiment synthesis
If JS module evaluation dominates startup, defer optional imports and initialization. If a retained JS object dominates memory, remove the reference. Compare identical devices and journeys; these are proposed tests, not measured gains.
[S01] [S14]Trade-off synthesis
Deferral can move latency to first use and complicate error handling. Set a target for both launch and the deferred action.
[S01] [S14]Pitfall verified
A dev build and remote debugging path can distort runtime behavior. Verify Hermes is actually active and repeat the profile on the release configuration users receive.
[S01] [S14]Check yourself: What would make a Hermes upgrade a poor explanation for a slow screen?
A trace showing the time is dominated by native SDK initialization, image decode, network or UI mount rather than JS engine work.