Mobile development · Advanced · 22 min
Speed up a React Native app on a low-end Android phone
By Padding · Updated 18 Nov 2026
Expo SDK 58 · React Native 0.88.1 · Reanimated 4.8 · expo-image 58.0 · Android phone or emulator with 2 to 3 GB RAM
You will measure a release build of your Expo app on a 2 to 3 GB Android phone, fix slow startup, dropped frames and re-render storms, and finish with a written performance budget you can check before every release.
On this page
A React Native app that feels fine on your own phone can stutter on the phones many of your users carry. A handset with 2 to 3 GB of RAM and an older, slower processor has less headroom for JavaScript, image decoding and layout, so problems that hide on a flagship show up there first. In much of Africa, South Asia and Latin America these phones are a large share of the market, and the people using them often watch their prepaid data closely too.
This tutorial works through one app of your own, in order: get a fair test device, measure a release build, find what slows startup, push work out of the way of the first screen, move animations off the JavaScript thread, stop needless re-renders, shrink images, and write the numbers down as a budget. Each step ends with a check you can see on the phone or in a tool.
Two rules hold for the whole tutorial. Measure on the slow device, not your laptop or your own phone. And judge every change by numbers from a release build: a development build runs extra checks on the JavaScript thread and is always slower, so its numbers mislead.
Step 1 · Get a fair low-end test device
The best test device is a real, cheap Android phone of the kind your users buy: 2 or 3 GB of RAM, a budget processor and a recent Android version. Ask your support team or analytics which models are common among your users, and buy one second-hand if you can. Keep it for testing only, and do not install your own apps on it, so its memory state stays close to a user's.
If you cannot get one yet, slow down an emulator. In Android Studio, open Device Manager, and create a phone device. In the Configure virtual device dialog, open the Additional settings tab (older Android Studio versions call this Show Advanced Settings). Under Emulated Performance, set CPU cores to 2 and RAM to 2 GB, then finish. An emulator on a fast laptop is still quicker than a budget phone's processor, so treat its numbers as a floor: if the emulator is slow, the real phone is slower.
Write down the device you test on (model, RAM, Android version) at the top of a notes file, for example docs/performance.md in your repo. Every number you record later belongs to that device.
Check it worked
Connect the phone over USB (or start the emulator) and run adb devices. Your device appears with the word device next to it, not unauthorized. Then run adb shell cat /proc/meminfo | head -1 and confirm MemTotal is somewhere under 3 GB (the figure is in kB, so below about 3,000,000).
Step 2 · Build and launch a release build
Build the release variant of your app and install it on the device. This bundles your JavaScript with production settings, compiles it to Hermes bytecode and turns off development checks:
npx expo run:android --variant releaseThis release build is signed for local testing, not for the Play Store. Use it only for measuring. For day-to-day work there is also a debugOptimized variant that runs closer to release speed while keeping the dev tools, but take your final numbers from release.
Before you measure, remove console.log calls from production bundles. In a bundled app they can block the JavaScript thread, and libraries call them too. Install the Babel plugin as a dev dependency:
npm install --save-dev babel-plugin-transform-remove-console@6.9.4Then add it for production only in babel.config.js. If your project has no babel.config.js, create it with this content; if it has one, add the env block to it:
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
env: {
production: {
plugins: ['transform-remove-console'],
},
},
};
};Rebuild with the same run:android --variant release command after the change.
Now measure cold start, the time from tapping the icon to the first frame of your app. Android calls this time to initial display (TTID). Find your package name in app.json under android.package, then run this, replacing com.example.myapp with yours:
adb shell am force-stop com.example.myapp
adb shell am start -S -W com.example.myapp/.MainActivityThe -S flag stops the app first and -W waits for the launch to finish. The output includes a TotalTime line in milliseconds. Run the pair of commands five times and write down the middle (median) value, since single runs vary.
Check it worked
The app opens on the device with no Expo development menu or red and yellow error boxes, which tells you it is the release build. Your notes file has a line like Cold start (TTID), release: 4,400 ms median of 5 for your device.
Step 3 · Read the JS and UI frame rates
React Native runs your React code on a JavaScript thread and draws native views on the UI (main) thread. At 60 frames per second each frame has about 16.7 ms. If the JavaScript thread is busy for longer than that, taps and JavaScript-driven animations freeze. If the UI thread is busy, scrolling itself judders.
For a quick read of both numbers, run your development build on the device, open the Developer menu (shake the phone, or run adb shell input keyevent 82), and turn on the performance monitor. It shows the UI and JS frame rates live. Scroll your busiest list, type in a search box, and open your heaviest screen. Note which number drops and where. Treat these figures as relative, because development mode slows the JavaScript thread.
For release numbers, use the frame stats Android keeps for each app. Force-stop the app, open it, do the same scroll on your busiest list for about ten seconds, then run:
adb shell dumpsys gfxinfo com.example.myappNear the top the output shows the total frames rendered and something like a Janky frames line with a count and percentage. Those are frames the UI side did not deliver in time. If the JS frame rate dropped in the Perf Monitor but janky frames stay low, your problem is mostly JavaScript work. If janky frames are high, look at heavy native views and large images as well.
To see both threads side by side in a release-like build, open the android folder in Android Studio, run the app as profileable, and record Capture System Activities in the Profiler while you scroll. The JavaScript thread is usually named mqt_js. Work that runs across the frame stripes shows you which thread is at fault.
Check it worked
Your notes file now names your slowest interaction and its numbers, for example Search list scroll: JS fps drops to ~20 while typing; janky frames 18% (release). You know whether that interaction is limited by the JS thread, the UI thread or both.
Step 4 · Find what slows startup with Expo Atlas and the Performance panel
Startup has two common costs in an Expo app: a large JavaScript bundle that takes time to load and run, and too much work done before the first screen draws.
To see what is in your bundle, export it with Atlas turned on and open the result:
EXPO_ATLAS=true npx expo export --platform android
npx expo-atlas .expo/atlas.jsonlAtlas shows each package and file by size. Look for large libraries imported by your first screen that it does not need yet: a charting library on a home screen with no chart, a full date library for one formatted date, a whole icon set, or test and storybook files that slipped in. The .expo/atlas.jsonl file contains your source code and any inlined EXPO_PUBLIC_ values, so do not commit it or share it outside your team.
To see which JavaScript functions take the time, use the Performance panel in React Native DevTools. Run your development build, press j in the terminal running npx expo start to open DevTools, start a recording, then go to the screen that loads at launch from a fresh navigation (or the slow interaction you noted). Stop recording and look for the longest blocks on the JavaScript track. React's own tracks show which components took longest to render. JavaScript profiles come from debug builds, so use them to find where time goes, not how much a release build spends.
Common startup culprits in the trace: analytics, crash reporting and remote config set up at import time; reading and parsing a large cached JSON blob before showing anything; loading every font and translation file at once; and a home screen that renders hundreds of rows on first paint.
Check it worked
Your notes file has a short list of three to five startup suspects, each with evidence: a package name and size from Atlas, or a function name and duration from the Performance panel. For example, charts-lib 410 KB in home bundle, unused on first screen or initRemoteConfig 380 ms before first render.
Step 5 · Defer work until after the first screen draws
The aim is to run only what the first screen needs before it draws, then start everything else once the user can see something.
Move set-up calls from module top level into a small hook that waits until the first frame has been drawn and the JavaScript thread is idle. requestIdleCallback runs a callback when the thread has spare time:
// src/useAfterFirstScreen.ts
import { useEffect } from 'react';
export function useAfterFirstScreen(task: () => void) {
useEffect(() => {
const handle = requestIdleCallback(() => task(), { timeout: 2000 });
return () => cancelIdleCallback(handle);
// run once after the first screen mounts
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}Use it in your root layout for anything that does not affect the first screen:
// app/_layout.tsx (excerpt)
import { useAfterFirstScreen } from '../src/useAfterFirstScreen';
export default function RootLayout() {
useAfterFirstScreen(() => {
// These were top-level imports and calls before.
require('../src/analytics').startAnalytics();
require('../src/remoteConfig').refreshRemoteConfig();
});
return <Stack />;
}Calling require inside the callback keeps the module from being run at startup. Keep anything that decides what the first screen shows (signed-in state, language) before first render, but make it as small as possible: read one small value, not a whole cache.
Apply the same idea inside screens. Show the first 10 or 20 rows, then load the rest. A long list belongs in a virtualised list; the FlashList tutorial covers that.
Rebuild the release variant and measure cold start again five times.
Check it worked
The release build still works: analytics events arrive and remote config still applies, a moment later. Your median TotalTime is lower than before, and your notes file shows both numbers, for example TTID 4,400 ms -> 2,050 ms.
Step 6 · Move animations to the UI thread with Reanimated
An animation driven from React state runs on the JavaScript thread, so it stutters whenever that thread is busy. Reanimated runs small functions called worklets on the UI thread, so animation keeps its frame rate while JavaScript is working. Reanimated 4 needs the New Architecture and the separate react-native-worklets package. Install both with the versions your SDK expects:
npx expo install react-native-reanimated react-native-workletsA common case is a header that fades as the user scrolls. Here is the slow pattern, which sets React state on every scroll event:
// Slow: a state update and re-render for every scroll event
const [offset, setOffset] = useState(0);
<ScrollView onScroll={(e) => setOffset(e.nativeEvent.contentOffset.y)} scrollEventThrottle={16}>And the Reanimated version, where the scroll position lives in a shared value and the style is computed on the UI thread:
// src/FadingHeaderScreen.tsx
import Animated, {
interpolate,
useAnimatedScrollHandler,
useAnimatedStyle,
useSharedValue,
Extrapolation,
} from 'react-native-reanimated';
import { StyleSheet, Text } from 'react-native';
export function FadingHeaderScreen({ children }: { children: React.ReactNode }) {
const scrollY = useSharedValue(0);
const onScroll = useAnimatedScrollHandler((event) => {
scrollY.value = event.contentOffset.y;
});
const headerStyle = useAnimatedStyle(() => ({
opacity: interpolate(scrollY.value, [0, 120], [1, 0], Extrapolation.CLAMP),
}));
return (
<>
<Animated.View style={[styles.header, headerStyle]}>
<Text style={styles.title}>Bookings</Text>
</Animated.View>
<Animated.ScrollView onScroll={onScroll} scrollEventThrottle={16}>
{children}
</Animated.ScrollView>
</>
);
}
const styles = StyleSheet.create({
header: { padding: 16, backgroundColor: '#ffffff' },
title: { fontSize: 20, fontWeight: '700' },
});The scroll handler and the style function are worklets, so neither touches React state and the component does not re-render while scrolling. Do the same for loading spinners, progress bars, press feedback and sheet gestures that you currently animate with useState or setInterval.
Check it worked
Turn on the performance monitor in a development build and scroll this screen while something keeps the JavaScript thread busy (typing in a search box on the same screen works). The JS frame rate may dip, but the header keeps fading smoothly. In the release build, dumpsys gfxinfo shows the same or fewer janky frames for that scroll than before.
Step 7 · Stop re-render storms
A re-render storm is one small change (a keystroke, a timer tick, a context update) that re-renders large parts of the tree. On a fast phone you never notice; on a budget phone it eats the JavaScript thread.
Open React Native DevTools from your development build, go to the Components panel, click the View Settings gear and tick Highlight updates when components render. Now use the app on the device: every component that re-renders flashes with an outline. Type one letter into a search box and watch what lights up. Only the input and the results should flash, not the header, tab bar or every row.
Typical fixes, in the order to try them:
- Move state down. If only the search box needs the query text, keep
useStateinside the search component, not the screen. - Split context. One large context with user, theme and cart re-renders every consumer on any change. Give fast-changing values their own context.
- Memoise rows. Wrap list rows in
React.memoand give them stable props: pass ids and primitive values, and wrap handlers inuseCallback, so an unchanged row skips rendering.
// src/BookingRow.tsx
import { memo } from 'react';
import { Pressable, Text } from 'react-native';
type Props = { id: string; title: string; onOpen: (id: string) => void };
export const BookingRow = memo(function BookingRow({ id, title, onOpen }: Props) {
return (
<Pressable onPress={() => onOpen(id)}>
<Text>{title}</Text>
</Pressable>
);
});// in the screen
const openBooking = useCallback((id: string) => router.push(`/bookings/${id}`), [router]);Use the Profiler in DevTools to record the same keystroke before and after, and compare the number of components rendered in that commit.
Check it worked
With highlight updates on, typing one letter flashes only the search input and the list area. A Profiler recording of one keystroke shows fewer components rendered than your recording from before the change, and your notes file has both counts.
Step 8 · Keep images small with expo-image
Images are often the biggest cost on low-memory phones. A 3000 px photo shown in an 80 px thumbnail still has to be downloaded and decoded, which uses memory, CPU and the user's data. Replace React Native's Image with expo-image and request images close to the size you display.
First record a baseline: in the release build, do a long scroll of your photo list with the current Image component, run adb shell dumpsys meminfo com.example.myapp, and write the TOTAL figure in your notes file.
npx expo install expo-image// src/Thumbnail.tsx
import { Image } from 'expo-image';
import { PixelRatio } from 'react-native';
const SIZE = 80;
export function Thumbnail({ id, url, blurhash }: { id: string; url: string; blurhash: string }) {
const px = PixelRatio.getPixelSizeForLayoutSize(SIZE);
return (
<Image
source={{ uri: `${url}?w=${px}` }}
style={{ width: SIZE, height: SIZE, borderRadius: 8 }}
contentFit="cover"
placeholder={{ blurhash }}
recyclingKey={id}
cachePolicy="memory-disk"
transition={150}
/>
);
}What each part does:
?w=${px}asks your image server or CDN for a version sized to the screen's pixels. The query parameter name depends on your image service; replacewwith whatever yours uses. This is the change that saves the most data and memory.expo-imagealso downscales to the view size by default (allowDownscaling), which helps when you cannot resize on the server.placeholderwith a blurhash shows a soft preview instead of an empty box while the image loads on a slow connection.recyclingKeyresets a recycled list cell to the placeholder, so a fast scroll does not show the previous row's photo.cachePolicy="memory-disk"keeps recent images in memory with disk as the fallback, so scrolling back does not download them again.
For a list of photos, check the memory the app uses while you scroll. After the switch, do the same long scroll, run adb shell dumpsys meminfo com.example.myapp again and compare its TOTAL line with your baseline.
Check it worked
Scroll your photo list on the device in the release build. Thumbnails show a blurred preview, then the image, and no row briefly shows the wrong photo. The TOTAL memory figure after scrolling is lower than with the old Image component, and your notes file has both figures.
Step 9 · Write a performance budget and check it before each release
A budget turns this work into a rule your team can keep. Pick three or four numbers, measured on your named test device with a release build, and add them to docs/performance.md:
## Performance budget (release build, <device model>, <RAM>, Android <version>)
| Measure | How | Budget | Last result |
| --- | --- | --- | --- |
| Cold start (TTID) | `am start -S -W`, median of 5 | under 2,500 ms | 2,050 ms |
| Time to interactive | stopwatch from icon tap to first booking tappable, median of 5 | under 4,000 ms | 3,700 ms |
| List scroll | 10 s scroll of bookings, `dumpsys gfxinfo` janky frames | under 5% | 3% |
| Bundle | Atlas, total Android JS bundle size | under 1.5 MB | 1.3 MB |These figures are an example. Set yours from today's results: make the budget a little better than where you are now, and tighten it as you improve. Choose the time-to-interactive moment yourself, the point where the main action on the first screen works.
Add a line to your release checklist: build the release variant, run the four measurements on the test device, and update Last result. If a number goes over budget, find the change that caused it before you ship, using the same tools from the earlier steps. Do not lower the budget to make a release pass without agreeing it with the team.
Check it worked
docs/performance.md names your test device and has a filled-in budget table with a last result for every row. Your release checklist links to it, and a teammate can repeat each measurement from the How column without asking you.
Next steps
- Design screens that hold up on these phones from the start: design for low-end Android phones.
Related tutorials
- Write end-to-end mobile tests with MaestroYou will have a small Maestro suite for a mobile app, with stable test IDs in React Native or Flutter, a shared sign-in flow fed by environment variables, smoke and full runs split by tags, and a CI job that runs the smoke flows on an Android emulator.
- Store data in a SwiftUI app with SwiftDataYou will build a small shop stock app that saves suppliers and products on the iPhone with SwiftData, lists them with sorted and filtered queries, survives a schema change through a migration plan, and is checked by tests that run against an in-memory store.
- Store data in a Flutter app with Drift and SQLiteYou will build a small shop credit book in Flutter 3.50 that keeps customers and what they owe in SQLite through Drift 2.35, with typed queries, a join, a list that redraws itself from a watch() stream, a tested schema migration and in-memory tests for all of it.
Need this done for you?
Padding does this work for growing companies, from the first diagnosis to a system that keeps working.
Get new tutorials