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

Created on 12 Jun 2019  路  18Comments  路  Source: facebook/react-native

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
Bug Android Stale

Most helpful comment

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 [email protected]. 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.

All 18 comments

DebugJS remotely will run/process JS on your computer, not a phone, and render results on the device. This might be caused by hardware specs of your device.

In my case, stacktrace-parser module causes the problem.
Downgrade to "[email protected]" solved the problem.

@dulmandakh why did you close?
why can't you provide at least a command line option to react native cli that starts the app with debugger attached? This would help so much

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 [email protected]. 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 here.

react-native info:

System:
    OS: macOS 10.14.5
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 335.48 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.15.3 - /usr/local/bin/node
    Yarn: 1.15.2 - /usr/local/bin/yarn
    npm: 6.10.2 - ~/.npm-global/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
    Android SDK:
      API Levels: 21, 22, 23, 24, 26, 27, 28
      Build Tools: 28.0.3
      System Images: android-22 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.4 AI-183.5429.30.34.5452501
    Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
  npmPackages:
    react: ^16.8.6 => 16.8.6 
    react-native: ^0.60.4 => 0.60.4 
  npmGlobalPackages:
    react-native-cli: 2.0.1

We experience the same
System: OS: macOS 10.14.6 CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz Memory: 550.94 MB / 32.00 GB Shell: 5.3 - /bin/zsh Binaries: Node: 10.16.0 - /usr/local/bin/node Yarn: 1.17.3 - /usr/local/bin/yarn npm: 6.9.0 - /usr/local/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, 26, 27, 28 Build Tools: 23.0.1, 25.0.0, 26.0.3, 27.0.3, 28.0.1, 28.0.2, 28.0.3 System Images: android-24 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom 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: eslint-plugin-react-native: 3.5.0 react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7

Same.

System: 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

any solution?

Same here:

System: OS: macOS 10.14.6 CPU: (8) x64 Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz Memory: 115.65 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 12.6.0 - /usr/local/bin/node Yarn: 1.6.0 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/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, 24, 25, 26, 27, 28, 29 Build Tools: 23.0.1, 23.0.3, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 27.0.2, 27.0.3, 28.0.3, 29.0.0, 29.0.2 System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-26 | Android Wear Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: 10.3/10G8 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.0-rc.2 => 0.61.0-rc.0

It might be related to facebook/hermes#48

In my configuration Hermes is disabled. Yet the issue is the same.

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

not it's not fixed

Same.
In addition, the behavior changes depending on whether debugging is enabled or not.

Any update on this?

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TrakBit picture TrakBit  路  3Comments

aniss picture aniss  路  3Comments

jlongster picture jlongster  路  3Comments

grabbou picture grabbou  路  3Comments

josev55 picture josev55  路  3Comments