Part 13 · Further improvements

Hermes diagnosis lab: startup, long tasks and heap

Prerequisites: 09-hermes-memory

Performance hypothesis loop

An experimental plan; it asserts no universal Hermes performance gain. Nodes: Release baseline, Trace JS, Find root cause, Targeted change, Repeat journey.
An experimental plan; it asserts no universal Hermes performance gain. [S01] [S14]

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]
Keep this: Treat engine tuning as a measured hypothesis in the app’s full startup and interaction path.
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.

Sources & further reading

  1. [S01] Using Hermes

    React Native · official documentation or maintainer source · accessed 2026-10-09 · current documentation as accessed; examples conceptual

    Supports: Hermes default, bundled version, release bytecode and measurement.

    Inspect the implementation boundary described by this source.

  2. [S14] React Native DevTools

    React Native · official documentation or maintainer source · accessed 2026-10-09 · current documentation as accessed; examples conceptual

    Supports: JS traces, heap snapshots and React profiling; native tools still needed.

    Inspect the implementation boundary described by this source.