react-native: Debugging is slow on real android device without attached debugger

React Native version: 0.59 (but also all others)

Steps To Reproduce

  1. Use real device for testing
  2. react-native run-android
  3. see that app is very slow on the device

Describe what you expected to happen:

Same performance as with attached remote debugger or at least a command line option to react native cli that starts the app with debugger attached.

Workaround

  1. adb shell input keyevent 82
  2. press “DebugJS remotely”
  3. see that app now performs much faster

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 18 (4 by maintainers)

Most upvoted comments

I don’t think this is caused by hardware specs of the device, because even on high-end Android devices I experience really bad performance in debug builds.

Please do notice that this only concerns debug builds, we’re experiencing this after updating to react-native@0.60.3. After connecting a js debugger the expected performance will return. This problem will persist, regardless if we enable or disable the use of Hermes engine.

We are also seeing issue on RN 0.60.4 @dulmandakh, please consider re-opening as it affects all devices, no matter their specs

Same.

    OS: macOS 10.14.5
    CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
    Memory: 18.55 MB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    Android SDK:
      API Levels: 23, 27, 28
      Build Tools: 23.0.1, 25.0.2, 25.0.3, 27.0.3, 28.0.3, 29.0.0, 29.0.0
      System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
      Android NDK: 20.0.5594570
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: ^16.8.6 => 16.8.6
    react-native: ^0.60.4 => 0.60.4
  npmGlobalPackages:
    react-native: 0.60.4```