Skip to main content

Profiling React Native Apps

Profiling is essential for identifying performance bottlenecks in your React Native application. Learn how to use various profiling tools to analyze and optimize your app.

Performance Monitor

Enable the built-in performance monitor to see real-time metrics:
The monitor displays:
  • JavaScript frame rate
  • UI frame rate
  • Views count
  • RAM usage

React DevTools Profiler

Installation

Using the Profiler

1

Start React DevTools

2

Connect your app

Start your React Native app with DevTools enabled. The app will automatically connect.
3

Record a profiling session

Click the Profiler tab, then click the record button to start profiling.
4

Analyze results

View flame charts showing component render times and why components re-rendered.

Using the Profiler API

Performance Timeline API

React Native implements the Web Performance API:

Performance Observer

Automatically monitor performance entries:

JavaScript Thread Profiling

Using Chrome DevTools

1

Enable remote debugging

Open the in-app developer menu and select “Debug”.
2

Open Chrome DevTools

Navigate to chrome://inspect in Chrome.
3

Start profiling

Go to the Performance tab and click Record.
4

Interact with app

Perform the actions you want to profile.
5

Analyze results

Stop recording and analyze the flame chart for bottlenecks.

Using Hermes Profiler

Hermes includes a built-in sampling profiler:
Visualize the profile:

Native Thread Profiling

Android Profiling

Systrace

Capture system-level performance:
Open trace.html in Chrome to analyze.

Android Studio Profiler

1

Open Android Studio

Open your project in Android Studio.
2

Run profiler

Click View > Tool Windows > Profiler.
3

Select process

Click the + button and select your app process.
4

Profile CPU

Click the CPU row to start CPU profiling:
  • Sample C/C++ Functions
  • Trace System Calls
  • Sample Java Methods

Method Tracing

iOS Profiling

Instruments

1

Build for profiling

In Xcode, select Product > Profile (Cmd+I).
2

Choose template

Select a profiling template:
  • Time Profiler: CPU usage
  • Allocations: Memory allocations
  • Leaks: Memory leaks
  • System Trace: System-level events
3

Record and analyze

Click the record button, use your app, then stop and analyze results.

Time Profiler

Analyze CPU usage:

Component Render Profiling

Why Did You Render

Detect unnecessary re-renders:

React.memo Profiling

Frame Rate Analysis

Monitor Frame Drops

Memory Profiling

Track Memory Usage

Find Memory Leaks

Network Profiling

Monitor Network Requests

Profiling Best Practices

  1. Profile on Real Devices: Simulators/emulators don’t represent real performance
  2. Use Production Builds: Development mode has overhead
  3. Test on Low-End Devices: Identify performance issues early
  4. Profile Specific Scenarios: Focus on critical user journeys
  5. Baseline First: Establish baseline metrics before optimization
  6. Profile Incrementally: Profile after each optimization

Profiling Checklist

  • Enable performance monitor
  • Profile with React DevTools
  • Use Hermes profiler for JavaScript
  • Profile native threads (Systrace/Instruments)
  • Monitor frame rate during animations
  • Track memory usage and leaks
  • Profile network requests
  • Test on multiple device tiers

Next Steps