how-to-investigate-performance.mo

Why

Sometimes, standards are not enough, or you're not applying them, resulting in performance bottlenecks.

Steps

Proceed by dichotomy: cut your app in multiple pieces in order to find out where the problem comes from. For example, literally remove some components or pages!

Profile

Measure the performance with the following tools. They're ordered by simplicity * perspectives of learnings.

  • Put some console.count('my component') in your components' render methods in order to measure the number of renders

  • In app Performance monitor (CMD+D on iOS, CTRL+M on Android; and select Performance monitor)

  • Network profiler => if some calls are too long, investigate backend performance (TODO link to backend performance standard)

  • Close React Native Debugger and open the Chrome debugger. Click on the performance tab and hit record to start profiling the performance of your application. See this article to learn how to read the output.

  • Native tools (Android Studio, XCode)

  • Inspect the JS<->native bridge with RN-Snoopy

Last updated