Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Measure performance of React Native apps

I need to measure the performance of a React Native app. What's the best tool for this?

I try google trace in google chrome, and Instruments in mac for iOS platform, but these show me a lot of unorganized data.

like image 587
danielfeelfine Avatar asked Apr 30 '17 00:04

danielfeelfine


1 Answers

I implemented some tools that helped me to check my application's performance, below is the list of the tools:

1) (reactotron) https://github.com/infinitered/reactotron

It's the coolest way to get logs of your application(redux actions etc), I have integrated this tool in my projects, in case you need any help just feel free to ask.

2) https://facebook.github.io/react/docs/perf.html (react-addons-perf)

This tool tells you about the frames/s,instances etc.. This is a react tool, it possible to integrate with react native.

Use the built-in Profiler to get detailed information about work done in the JavaScript thread and main thread side-by-side.

For iOS, Instruments are an invaluable tool, and on Android you should learn to use systrace.

You can also use react-addons-perf to get insights into where React is spending time when rendering your components.

Another way to profile JavaScript is to use the Chrome profiler while debugging. This won't give you accurate results as the code is running in Chrome but will give you a general idea of where bottlenecks might be.

Note: The above tools are for monitoring javascript performance, for example time took to rendering of components, which action in redux is getting inbetween the flow of regular actions..

Cheers :)

like image 136
Codesingh Avatar answered Oct 02 '22 14:10

Codesingh