TL;DR: React Native cold start is mostly native process setup plus loading and evaluating your JavaScript. Hermes (the default engine since React Native 0.70) compiles JavaScript to bytecode at build time, so release builds skip source parsing on the device. On top of that, defer module evaluation with inline requires and
React.lazy, keep non-critical SDK setup off the startup path, and enforce a bundle size budget in CI. Measure every change withadb shell am start -Won a physical low-end device, because without a number you cannot tell whether anything helped. Configuration in this guide targets React Native 0.76 and later.
Key Takeaways
- Measure first.
adb shell am start -S -W <package>/.MainActivityreportsTotalTime, which Android documents as time to initial display (TTID). For React Native that first frame is often the splash or an empty root view, so also track when your first real screen renders. - Hermes has been the default engine since React Native 0.70. In 0.76+ projects,
hermesEnabled=truelives inandroid/gradle.properties, and iOS enables Hermes unless you runpod installwithUSE_HERMES=0. The oldproject.ext.react = [enableHermes: true]block is obsolete. - Release builds compile JavaScript to Hermes bytecode with the default flags
["-O", "-output-source-map"]. Debug builds load source from Metro, so never judge startup on a debug build. - Metro produces one bundle.
React.lazyand inline requires defer evaluation, not download or file size. True bundle splitting on native requires a different bundler such as Re.Pack. InteractionManageris deprecated as of React Native 0.82. UserequestIdleCallback(or simply a post-render effect) to schedule deferred setup.- Do not defer crash reporting. Sentry's own docs say to initialize as early as possible, because anything that crashes before
initis invisible.
You have built a feature-rich mobile application. The animations are smooth and the business logic is solid. But when a user taps the icon on a mid-range Android phone, they look at a splash screen for several seconds before anything usable appears.
Long startup is one of the most visible performance problems in a mobile app because every user pays it on every cold launch. Teams often try generic fixes first (compressing images, stripping assets) and then discover that the real cost sits in how much JavaScript is loaded and evaluated before the first screen can render.
This guide walks through how React Native starts, how to measure it honestly, how to confirm Hermes bytecode is actually what ships, how to defer work that does not need to run at launch, and how to stop regressions in CI. If you are still on an older React Native release, read our staged upgrade plan for React Native 0.7x apps first, because several of the defaults described here only apply to current versions.
The Anatomy of a React Native Cold Start
Before optimizing, it helps to know what happens between the tap and the first interactive screen. A simplified sequence for a release build looks like this:
- Process creation: Android or iOS creates the app process and runs native application setup (
Application.onCreateon Android,application:didFinishLaunchingWithOptions:on iOS). - Native module and runtime setup: React Native creates the JavaScript runtime and the infrastructure it uses to talk to native code (JSI, and on the New Architecture, TurboModules and Fabric).
- Bundle loading: The runtime loads the bundle shipped inside the APK or IPA. With Hermes this is precompiled bytecode (
.hbccontent), not JavaScript source. - Module evaluation: The entry file runs, which evaluates every module it imports eagerly, and every module those import, and so on.
- First render: React renders the root component, Fabric commits the tree, and native views are drawn.
With JavaScriptCore and plain source bundles, step 3 included parsing and compiling text, which grows with bundle size and is slow on low-end CPUs. Hermes removes most of that cost. What remains, and what you control, is mostly step 4 (how much code runs at launch) and anything expensive you schedule in step 1 or before the first render.
Production Note: Profile on physical, lower-tier devices. Emulators and simulators run on a desktop CPU and will hide costs that your real users pay.
How to Measure Startup Time
You cannot claim a startup is fast, sub-second or otherwise, until you have a repeatable number. Android gives you two built-in measurements, documented in the Android app startup time guide.
Time to initial display (TTID) is the time until the first frame of the launched activity is drawn. Measure a cold start like this:
# -S force-stops the app first, so each run is a cold start.
# -W waits for launch to complete and prints timing.
adb shell am start -S -W \
-c android.intent.category.LAUNCHER \
-a android.intent.action.MAIN \
com.yourcompany.app/.MainActivity
# Typical output:
# Starting: Intent { ... }
# Status: ok
# Activity: com.yourcompany.app/.MainActivity
# ThisTime: 1432
# TotalTime: 1432
# WaitTime: 1460
# Complete
TotalTime (in milliseconds) is the value to track. The same number appears in Logcat as a line containing Displayed com.yourcompany.app/.MainActivity: +1s432ms. Run the command ten or more times and compare medians, since single runs are noisy.
There is a catch specific to React Native: the first frame of MainActivity is often the splash theme or an empty root view, drawn before your JavaScript has rendered anything. TTID therefore captures native startup well but can look good while users still wait for content.
Time to full display (TTFD) fills that gap. Android reports it when the activity calls reportFullyDrawn(), and logs a Fully drawn com.yourcompany.app/.MainActivity: +2s054ms line. In a React Native app, a small native module that calls reportFullyDrawn() on the current activity, triggered from your first meaningful screen's effect, gives you a system-recorded TTFD. Android's documentation warns that calling it before the first frame makes TTID and TTFD identical, so call it after real content renders.
A simple measurement routine for each change:
| Step | Command or action | What you record |
|---|---|---|
| Build a release variant | npx react-native run-android --mode release | Confirms you are testing bytecode, not a Metro-served debug bundle |
| Cold start, 10+ runs | adb shell am start -S -W ... | Median TotalTime (TTID) |
| Full display | Logcat filter Fully drawn | Median TTFD, if you call reportFullyDrawn() |
| Compare | Same device, same build except the change | Difference in medians |
On iOS, Xcode Instruments has an App Launch template that records launch phases for a release build on device. The principle is the same: same device, release configuration, multiple runs, compare medians.
Hermes Bytecode Precompilation: Confirming What Ships
Hermes is an engine built for React Native. Its key property for startup is described in the React Native docs on optimizing JavaScript loading: in release builds, JavaScript is compiled to bytecode ahead of time, and bytecode is loaded to memory on demand without being parsed like plain JavaScript.
Hermes became the default engine in React Native 0.70, so most current apps already use it. The work is usually to confirm it is enabled on both platforms, that release variants actually ship bytecode, and that no leftover legacy configuration is fighting the defaults.
Android (React Native 0.76+)
The engine switch is a Gradle property, not an entry in build.gradle:
# android/gradle.properties
newArchEnabled=true
hermesEnabled=true
Compiler settings live in the react {} block applied by the React Native Gradle Plugin. The defaults are correct for most apps, so you only uncomment what you need:
// android/app/build.gradle
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
react {
// Variants listed here skip bundling and load JS from Metro.
// Default is ["debug"]. If you add flavors, list every debuggable one,
// otherwise a "staging" build might silently ship without a bundle.
// debuggableVariants = ["liteDebug", "prodDebug"]
// Flags passed to hermesc. The default already optimizes and emits
// a source map for symbolicating production stack traces.
// hermesFlags = ["-O", "-output-source-map"]
autolinkLibrariesWithApp()
}
If you are upgrading an older app and still see project.ext.react = [ enableHermes: true, ... ] or hermesFlagsRelease, that is pre-0.71 configuration. Remove it and use the property and block above. The plugin adds the com.facebook.react:hermes-android dependency itself, so you do not need a manual if (hermesEnabled) implementation(...) switch either.
iOS (React Native 0.76+)
The template Podfile does not mention Hermes at all. use_react_native! enables it by default and only turns it off when the USE_HERMES environment variable is 0:
# ios/Podfile (excerpt from the 0.76 template)
target 'YourApp' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
end
# Hermes on (default)
cd ios && bundle exec pod install
# Hermes off, only if you have a specific reason to use JavaScriptCore
cd ios && USE_HERMES=0 bundle exec pod install
If your Podfile still has :hermes_enabled => false from an old migration, delete it.
Verifying at runtime
The Hermes docs suggest checking for the HermesInternal global:
// utils/engineCheck.ts
export const isHermesEngine = (): boolean =>
typeof (globalThis as { HermesInternal?: unknown }).HermesInternal !== 'undefined';
if (!isHermesEngine()) {
console.warn('Not running on Hermes. Startup will include JS parsing.');
}
The same page adds a caveat worth repeating: if you load the bundle in a non-standard way, HermesInternal can exist while the app is not actually executing precompiled bytecode. If you use a custom bundle loader or an over-the-air update system, confirm the shipped artifact is Hermes bytecode and benchmark before and after. Our guide to secure OTA hotfixes with Expo EAS covers how update bundles are produced.
When legacy apps arrive with a startup problem, the first checks in our React Native app development services are exactly these: is Hermes on for both platforms, do all release flavors ship bytecode, and is any leftover pre-0.71 Gradle config overriding the defaults. They are cheap to verify and frequently the cause.
Deferred Module Loading: What "Code Splitting" Means Under Metro
Even with bytecode, a large app evaluates a lot of modules at launch if everything is imported eagerly from the entry file. Reducing that is the next lever.
On the web, bundlers like webpack or Rollup split code into chunks that are fetched over the network on demand. Metro, the default React Native bundler, does not do this for native production builds: it produces a single bundle. So under Metro, techniques often described as code splitting actually do something narrower but still useful: they defer module evaluation until the code is needed. The bytes are still in the bundle; they just do not run at startup.
| Technique | Bundle file smaller? | Defers evaluation? | Production on native |
|---|---|---|---|
| Inline requires (Metro) | No | Yes | Yes, on by default with React Native CLI |
React.lazy + import() under Metro | No | Yes | Yes |
| Expo Router async routes | Yes, in development | Yes | Not supported yet on native production |
| Re.Pack (Rspack or webpack) async chunks | Yes | Yes | Yes, but you replace Metro |
Inline requires
With inline requires, Metro rewrites module references so that a require runs where the value is first used rather than at the top of the file. The React Native docs note that with the React Native CLI this is applied automatically, in your code and in node_modules. Expo projects do not inline by default and must opt in.
The default @react-native/metro-config already enables it. If your project overrides getTransformOptions, make sure you did not switch it off:
// metro.config.js
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
/** @type {import('metro-config').MetroConfig} */
const config = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
The documented risk is that inlining changes the order modules are evaluated in, and some modules may never be evaluated. Code that relies on import side effects (polyfills, global registrations) should be imported explicitly from the entry file or excluded with inlineRequires.blockList or nonInlinedRequires.
Lazy screens with React.lazy
The React Native docs recommend lazy-loading screen-level components so that adding screens does not increase startup time. Under Metro, import() resolves from the bundle already on the device, so this defers evaluation of the screen and its dependency tree until first navigation.
// navigation/RootNavigator.tsx
import React, { Suspense, lazy } from 'react';
import { ActivityIndicator, View } from 'react-native';
import { createNativeStackNavigator, NativeStackScreenProps } from '@react-navigation/native-stack';
import HomeScreen from '../screens/HomeScreen'; // needed at launch
// Evaluated on first navigation, not at launch.
const SettingsScreen = lazy(() => import('../screens/SettingsScreen'));
const AnalyticsDashboard = lazy(() => import('../screens/AnalyticsDashboard'));
type RootStackParamList = {
Home: undefined;
Settings: undefined;
Analytics: undefined;
};
const Stack = createNativeStackNavigator<RootStackParamList>();
function ScreenFallback() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<ActivityIndicator size="large" />
</View>
);
}
// Defined once at module scope. An inline arrow passed to `component`
// would be a new component type on every render and remount the screen.
function LazySettings(props: NativeStackScreenProps<RootStackParamList, 'Settings'>) {
return (
<Suspense fallback={<ScreenFallback />}>
<SettingsScreen {...props} />
</Suspense>
);
}
function LazyAnalytics(props: NativeStackScreenProps<RootStackParamList, 'Analytics'>) {
return (
<Suspense fallback={<ScreenFallback />}>
<AnalyticsDashboard {...props} />
</Suspense>
);
}
export default function RootNavigator() {
return (
<Stack.Navigator initialRouteName="Home">
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Settings" component={LazySettings} />
<Stack.Screen name="Analytics" component={LazyAnalytics} />
</Stack.Navigator>
);
}
Two practical notes. First, the gain is proportional to how much a lazy screen pulls in: a dashboard importing a charting library is worth deferring, a small form is not. Second, the official docs warn that lazy loading changes behavior if modules have side effects, so keep screen modules free of top-level work.
Trade-off: the first navigation to a lazy screen does the evaluation work that launch skipped, so it can be briefly slower and may flash the fallback. Pick fallbacks that look intentional.
When you need real bundle splitting
If you need separate chunks (for example, very large optional features, or independently deployed modules), look at Re.Pack, which builds React Native apps with Rspack or webpack and supports Module Federation. That is a bundler migration with its own build, tooling, and update story, so measure whether deferred evaluation already gets you enough before taking it on. Expo Router's async routes do split by route, but the Expo docs state they do not yet support native production apps.
Deferring Non-Critical Initialization
A common pattern in large apps is to initialize every SDK in index.js or at the top of App.tsx:
// Everything here runs before the first render.
import * as Sentry from '@sentry/react-native';
import { initAnalytics } from './services/analytics';
import { initSupportChat } from './services/supportChat';
import { initFeatureFlags } from './services/featureFlags';
Sentry.init({ dsn: process.env.SENTRY_DSN });
initAnalytics();
initSupportChat();
initFeatureFlags();
Each of these imports pulls in a module graph that must be evaluated, and some SDK setup does real work on the JavaScript thread. Anything that is not needed for the first screen is a candidate to move later.
Do not move crash reporting. Sentry's React Native docs say to initialize the SDK as soon as possible to capture all errors. If you defer it, crashes during startup, which are exactly the ones that make users uninstall, are never reported. Keep Sentry.init in the entry file and defer the rest.
For the deferral itself, older articles use InteractionManager.runAfterInteractions. As of React Native 0.82 InteractionManager is deprecated, and its docs recommend requestIdleCallback instead. A version that works on current React Native:
// index.js: keep crash reporting first
import * as Sentry from '@sentry/react-native';
Sentry.init({ dsn: 'YOUR_DSN' });
// ...AppRegistry.registerComponent as usual
// hooks/useDeferredAppInit.ts
import { useEffect } from 'react';
export function useDeferredAppInit() {
useEffect(() => {
// Runs after the first commit, when the JS thread is idle.
const handle = requestIdleCallback(async () => {
try {
const [{ initAnalytics }, { initSupportChat }] = await Promise.all([
import('../services/analytics'),
import('../services/supportChat'),
]);
initAnalytics();
initSupportChat();
} catch (error) {
console.error('Deferred SDK setup failed', error);
}
});
return () => cancelIdleCallback(handle);
}, []);
}
// App.tsx
import React from 'react';
import { useDeferredAppInit } from './hooks/useDeferredAppInit';
import RootNavigator from './navigation/RootNavigator';
export default function App() {
useDeferredAppInit();
return <RootNavigator />;
}
Wrapping vendor SDKs in your own services/* modules keeps the vendor imports out of the startup graph and gives you one place to adapt when an SDK changes its API. Three cautions:
- Analytics events before init. If the first screen logs events, queue them in your wrapper until the SDK is ready, or you will lose launch events.
- Feature flags. If the first screen depends on a flag, that flag fetch is on the critical path by definition. Use a cached value from the previous session and refresh in the background instead of deferring blindly.
- Native-side setup. Some SDKs initialize in
MainApplicationorAppDelegate. JavaScript deferral does not touch that; check native startup with the TTID measurement above.
For work that must survive the app being backgrounded, see our guide to Headless JS and WorkManager for background sync.
Profiling Bundle Contents
You cannot shrink what you have not looked at. Large bundles usually come from a few heavy dependencies rather than from your own code.
react-native-bundle-visualizer builds a production bundle and opens a treemap of which packages take up space. Version 4 supports React Native 0.72+ and Expo SDK 50+ and requires Node.js 20+.
# React Native CLI project; defaults to a production (non-dev) build
npx react-native-bundle-visualizer@latest --platform android
# Expo project
npx react-native-bundle-visualizer@latest --expo --platform android
Common findings and what actually helps under Metro:
| Finding | Why it matters | Fix that works with Metro |
|---|---|---|
Whole lodash imported | import _ from 'lodash' or import { debounce } from 'lodash' pulls in the whole library, and Metro does not tree-shake by default, so switching to lodash-es does not help | Per-method imports: import debounce from 'lodash/debounce' (the form lodash documents for cherry-picking) or native equivalents |
moment with all locales | Large library plus locale data | date-fns with per-function imports, or dayjs |
| Node polyfills from crypto or web3 libraries | Pulls in buffer, stream, and similar shims | Use native crypto modules or libraries written for React Native |
Large JSON imported with require('./data.json') | Becomes part of the bundle and is evaluated when required | Load from native assets or the network, or require it lazily where used |
The general rule for Metro: import the narrowest path a package offers, because unused exports of a module you import are not removed.
Continuous Monitoring in CI
Startup regressions tend to arrive one innocent import at a time. A cheap guard is a bundle size budget checked on every pull request. size-limit with the @size-limit/file plugin measures a prebuilt file, so you can point it at the bundle Metro produces.
npm install --save-dev size-limit @size-limit/file
{
"scripts": {
"build:android:bundle": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output build/android-main.bundle",
"check:size": "size-limit"
},
"size-limit": [
{
"path": "build/android-main.bundle",
"limit": "3 MB",
"brotli": false
}
]
}
brotli: false matters: @size-limit/file compresses with Brotli by default, but the device loads the uncompressed bundle, so the raw size is the meaningful number. This measures the JavaScript bundle rather than the Hermes bytecode the release build ships, which makes it a proxy. It is still a good one, because bytecode size tracks the amount of code you ship. Set the limit a little above your current size and lower it as you remove weight.
A GitHub Actions workflow using current action versions and a supported Node.js LTS:
# .github/workflows/bundle-size.yml
name: Bundle size
on: [pull_request]
jobs:
bundle-size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: mkdir -p build && npm run build:android:bundle
- run: npm run check:size
If the bundle exceeds the limit, the job fails and the pull request shows which change caused it. Size is not startup time, though. For a stronger signal, add a scheduled job that installs a release build on a real device or device farm and records median TotalTime, then alert on regressions. Our post on OTA hotfix pipelines covers related CI structure for React Native.
Common Mistakes and Failure Modes
- Measuring debug builds. Debug variants load source from Metro and include dev tooling. Numbers from them say nothing about production.
- Measuring on an emulator. Desktop CPUs hide evaluation cost.
- Trusting TTID alone. A fast splash with a slow first screen still feels slow. Track TTFD or a first-screen marker too.
- Legacy Gradle config. A leftover
project.ext.reactblock or a custom flavor missing fromdebuggableVariantshandling can ship an unexpected bundle. - Deferring crash reporting. You lose the crashes that matter most.
- Side-effect imports broken by inline requires. A polyfill that is never evaluated causes failures far from the cause.
- Assuming
React.lazyshrinks the bundle. Under Metro it does not; it only moves evaluation.
Production Readiness Checklist
- Baseline median
TotalTimerecorded on a physical low-end Android device, release build, 10+ cold starts. - TTFD or an equivalent first-screen marker recorded.
-
hermesEnabled=trueinandroid/gradle.properties; noproject.ext.reactblock remains. - iOS
pod installruns withoutUSE_HERMES=0; no:hermes_enabled => falsein the Podfile. - Every non-debug flavor ships a bundle (check
debuggableVariants). - Inline requires enabled (default with React Native CLI; opt in on Expo) and side-effect modules imported explicitly.
- Heavy, rarely used screens loaded with
React.lazy. - Crash reporting initialized in the entry file; other SDKs deferred with
requestIdleCallback. - Bundle visualized; per-method imports for lodash and similar libraries.
- Bundle size budget enforced in CI.
- Each change re-measured against the baseline before merging.
Fixing Launch Times for Good
Fast startup in React Native comes from a few disciplined habits rather than one trick. Confirm Hermes bytecode is what actually ships on both platforms. Keep the launch path small by deferring module evaluation and moving non-critical SDK setup after the first render, while keeping crash reporting first. Watch bundle growth in CI, and above all, measure cold start the same way every time so you know which change helped and by how much.
If startup problems are tied to an older architecture, the next steps are our guides on migrating to Fabric and TurboModules and upgrading from React Native 0.7x.
Sources
- Hermes (React Native docs)
- Optimizing JavaScript loading (React Native docs)
- React Native Gradle Plugin (React Native docs)
- InteractionManager, 0.82 (React Native docs, deprecation notice)
- App startup time (Android Developers)
- Async routes (Expo Router docs)
Need help building this in production?
SoftwareCrafting is a full-stack dev agency - we ship fast, scalable React, Next.js, Node.js, React Native & Flutter apps for global clients.
Get a Free ConsultationFrequently Asked Questions
Why is my React Native app stuck on the splash screen during startup?
Usually because a lot of JavaScript is evaluated before the first screen renders, or because SDK setup runs synchronously at launch. Confirm the release build uses Hermes bytecode, move non-critical imports and SDK initialization out of the entry file, and lazy-load heavy screens. Then measure again to confirm which change helped.
How do I measure cold start time for a React Native Android app?
Install a release build on a physical device and run adb shell am start -S -W com.yourcompany.app/.MainActivity several times. TotalTime is the time to initial display. Because the first frame in React Native is often the splash, also measure time to full display by calling reportFullyDrawn() once your first real screen renders, and read the Fully drawn line in Logcat.
Is Hermes enabled by default?
Yes. Hermes has been the default engine since React Native 0.70. In current projects it is controlled by hermesEnabled in android/gradle.properties and, on iOS, is on unless you run pod install with USE_HERMES=0.
Does React.lazy split the bundle in React Native?
Not under Metro, which produces a single bundle for native production builds. React.lazy defers when a screen's modules are evaluated, which still reduces startup work. For separate chunks you need a bundler such as Re.Pack.
Why is my app still slow after enabling Hermes?
Hermes removes parsing cost, but evaluating a large module graph and running SDK setup still takes time. Check for native work in MainApplication or AppDelegate, eagerly imported heavy libraries, and synchronous initialization in the entry file. Measure TTID and TTFD separately to see whether the delay is native or JavaScript.
