App start time
How long your app takes to start on your users' phones, per release, and which code takes the time.
Builds published with healkite release measure start-up when the app has the Healkite Babel plugin
(the same one production debugging uses):
// babel.config.js
plugins: ["react-native-healkite/babel"],Then each release page shows App start:
1.42 s median · +31% vs v41 · p75 1.71 s · p90 2.30 s
Where the time goes (per launch):
src/analytics/index.ts380 ms new ·node_modules/react-native-reanimated120 ms ·src/App.tsx40 ms
Or in a terminal: npx healkite startup rel_01j….
How it's measured
- The build wraps each of your app's files, and each package's entry file, with two timestamps. A package's time includes the package's own start-up work. React Native itself isn't measured.
- The SDK loads first and counts each file's own time (not the files it imports) until the app
reports ready (
Healkite.sync()ornotifyAppReady()). - Start-up time is measured from when the JavaScript runtime starts to when the app reports ready.
- 1 in 5 launches sends a sample: the time plus the 25 slowest files. No user data.
- The overhead is two timer calls per measured file. Turn it off with
healkite release --no-startup-profile.
Stop a release that starts slower
Add a start-up limit to a guarded release. It halts, and devices go back, when the median start is more than that much slower than the previous release, once both have enough launches:
npx healkite release -c production-… -p android -r 2.4 --guarded --guard-max-startup 20In the API, it's guard.maxStartupRegressionPct.
Making it faster
What usually helps, in order:
- Move work out of the top level of files (create clients, read storage, register listeners when first needed, not when the file loads).
- Import heavy packages where they're used, not in
App.tsxorindex.js. - Keep Metro's
inlineRequireson (the React Native default), so files load on first use. - Check the "new" and "was" markers after each release: they point at the change that slowed it.