Moureaux introduces a CLI version of the React Native Flipper Performance Monitor to track metrics such as FPS, CPU, and RAM. It can measure Android apps without adding anything to the app, and automate repeated test scenarios. Ten 15-second runs produced an initial score of 31 out of 100 and showed sustained JS thread activity.
Performance issues: the usual suspects
Speaker
A. Moureaux, a mobile app performance specialist at Callstack, demonstrates how to find and fix common React Native performance problems at React Native EU 2022.
React DevTools profiling showed that a countdown hook caused the whole Tweets tab to render each second, taking about 400 milliseconds. Moving the countdown into its own component reduced commits to about 18 milliseconds; using Jotai to isolate the seconds display brought its render time to roughly 0.4 milliseconds. Moving user data queries into a UserHeader component also stopped those updates from rerendering the Tweets tab, and the release score rose from 53 to 67.
The app rendered Media and Replies tabs even when they were not open. Setting the React Navigation Material Top Tab Navigator's lazy option reduced unnecessary work and raised the measured score from 67 to 75, with average CPU usage also falling.
A Hermes profiler trace showed that filtering tweets repeatedly parsed dates to determine weekdays. Replacing that work with a direct weekday check cut the Tweets tab's render time to about 1.7 milliseconds. Android Studio profiling then revealed a skeleton loader animation running behind the loaded list and slowing the UI thread; hiding it improved frame rates. A small WebView displaying a GIF also used substantial CPU, and replacing it helped raise the final score to 96 out of 100.
Takeaways
- Repeat performance tests under consistent conditions and average results across runs.
- Keep frequently changing state in the smallest component that needs it.
- Let components fetch the data they display to limit unrelated rerenders.
- Use lazy loading to avoid rendering screens before they are needed.
- Profile JS and native threads; unnecessary animations, repeated calculations, and heavyweight WebViews can each slow an app.
Mentioned in this talk
Search inside this talk
What was claimed 11
- featureReact Native Flipper Performance Monitor: Tracks JS and UI FPS; its CLI automates performance measurements without requiring installation in the app
“track JS and UI FPS”
YouTube Unverified1 source· Talk
- integrates withReact Native Flipper Performance Monitor integrates with Detox
“integrates quite well with any end-to-end testing framework like Appium or Detox”
YouTube Unverified1 source· Talk
- integrates withReact Native Flipper Performance Monitor integrates with Appium
“integrates quite well with any end-to-end testing framework like Appium or Detox”
YouTube Unverified1 source· Talk
- featureReact DevTools: Profiles component commits and can record why each component rendered
“make sure you check “Record why each component rendered” while profiling”
YouTube Unverified1 source· Talk
- usesJotai uses React Native
“create an atom for your countdown with Jotai”
YouTube Unverified1 source· Talk
- metricReact Native Flipper Performance Monitor: The example app's score improved from 1.3 to 3.3 and average JS thread blocking fell from about 9 seconds to under 4 seconds after the FastTimer change.
“the score went from 1.3 to 3.3”
YouTube Unverified1 source· Talk
- uses
“I’m using React Query”
YouTube Unverified1 source· Talk
- featureReact Navigation: Material Top Tab Navigator supports lazy screen rendering
“it has a screen option you can pass with lazy set to true”
YouTube Unverified1 source· Talk
- feature
Hermes Agent: Sampling profiler traces can be converted into a format readable by Google Chrome
“use the react-native profile-hermes command to pull the trace file and convert it into a format Google Chrome can read”
YouTube Unverified1 source· Talk
- usesdate-fns uses React Native
“I was using date-fns”
YouTube Unverified1 source· Talk
- metricReact Native Flipper Performance Monitor: The example app reached a final score of 96 out of 100 after replacing the WebView GIF with a GIF.
“we’re finally at 96 out of 100”
YouTube Unverified1 source· Talk






