It is a simple React Native app that uses Redux with two actions: one to increment a counter, one to decrement it.
The reducer (i.e. where the Redux state gets updated) has a while loop that runs for exactly 4 seconds. During these 4 seconds, it sends one CPU core to 100% usage.
I want to use React Native Debugger to profile this app, to see which function uses so much CPU. So I would expect the profiler to show something like
function counter: 4'001 ms
because it is the function counter that needs four seconds of CPU time to complete.
However, when I profile the app, nothing like this appears:
Not sure for what we need a profiler if it does not detect such a waste of CPU resources.
React Native Debugger app version: 0.11.9
React Native version: 0.63.4 (Expo SDK 41)
Platform: iOS
Is real device of platform: Yes
Operating System: macOS
Please check out my example project here:
https://github.com/yolpsoftware/redux-profiling
It is a simple React Native app that uses Redux with two actions: one to increment a counter, one to decrement it.
The reducer (i.e. where the Redux state gets updated) has a while loop that runs for exactly 4 seconds. During these 4 seconds, it sends one CPU core to 100% usage.
I want to use React Native Debugger to profile this app, to see which function uses so much CPU. So I would expect the profiler to show something like
because it is the function
counter
that needs four seconds of CPU time to complete.However, when I profile the app, nothing like this appears:
Not sure for what we need a profiler if it does not detect such a waste of CPU resources.
React Native Debugger app version: 0.11.9 React Native version: 0.63.4 (Expo SDK 41) Platform: iOS Is real device of platform: Yes Operating System: macOS