Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29474

Profiler in react-native broken (V8 and systrace)

$
0
0

I would like to see, which function is keeping my JS thread the most busy. But in any profiling option I just cant see any JS related stuff.

1) Profiling

The most useful would be the V8 profiler, which is accessible in debug mode (in Chrome DevTools or React Native Debugger). Somebody here suggests to look for debuggerWorker.js, but in my Profiling session this thread is missing.

RND profiling threads

2) Systrace

I found the JS thread (mqt_js), but it is collapsed and cant be drilled into. Any ideas? I run systrace.py --time=20 -o trace.html sched gfx view -a com.my.rnapp

systrace

3) RN "Enable Sampling Profiler"

I even tried the (undocumented) "Enable Sampling Profiler" option in RN debug menu, it seems working, and shows a message with trace location, but file is unfortunately empty everytime. (eg. /data/user/0/com.my.rnapp/cache/sampling-profiler-trace119834863.cpuprofile). Checked using adb shell and ls -la.

Enable Sampling Profiler

Other info:

  • tested both dev/prod versions, local metro bundler/bundled app
  • React Native 0.61.1
  • Emulator with Android API 25 (physical device as well)
  • macOS 10.14

Viewing all articles
Browse latest Browse all 29474

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>