Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading from v0.70.6 to v0.71.0 causing extremely slow debugging mode on Android #35828

Closed
alabsi91 opened this issue Jan 13, 2023 · 55 comments
Labels
Impact: Bug The issue represents a bug somewhere Needs: React Native Team Attention Platform: Android Android applications. Resolution: Fixed A PR that fixes this issue has been merged. Tech: Hermes Hermes Engine: https://hermesengine.dev/

Comments

@alabsi91
Copy link

Description

I recently upgraded my react-native project from version 0.70.6 to 0.71.0 using the React Native Upgrade Helper and have noticed a significant decrease in performance when using the debugging mode. The app takes much longer to load and the debugging process is extremely slow, making it difficult to make any changes.

Version

0.70.1

Output of npx react-native info

System:
OS: Windows 10 10.0.22621
CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
Memory: 4.42 GB / 15.93 GB
Binaries:
Node: 18.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.19.3 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 31, 32, 33
Build Tools: 30.0.3, 31.0.0, 33.0.0
System Images: android-31 | Google Play Intel x86 Atom_64
Android NDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-213.7172.25.2113.9123335
Visual Studio: 17.4.33110.190 (Visual Studio Community 2022)
Languages:
Java: 11.0.17
npmPackages:
@react-native-community/cli: Not Found
react: ^18.2.0 => 18.2.0
react-native: ^0.71.0 => 0.71.0
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Upgrade react-native project from version 0.70.6 to 0.71.0
Run the app in debugging mode
Notice the slow performance and long loading time

Snack, code example, screenshot, or link to a repository

//

@edsztukowski
Copy link

We're experiencing the same issue, we upgraded from RN 0.70.1.

@alabsi91 alabsi91 changed the title Upgrading from v0.70.6 to v0.71.0 causing super slow debugging mode on Android Upgrading from v0.70.6 to v0.71.0 causing extremely slow debugging mode on Android Jan 13, 2023
@manosKas
Copy link

manosKas commented Jan 13, 2023

+1

at least 2 to 4 seconds for any button to take action.

I'm guessing it has something to do with forcing all libraries to use 0.71.0

since i can only launch the app if i've built with the following in app/build.gradle:

configurations.all {
    resolutionStrategy {
        force 'com.facebook.react:react-native:0.71.0'
    }
}

cause otherwise i would get the following error:

couldn't find DSO to load: libjscexecutor.so

Another thing that may or may not be the cause is that my project is still in javascript as i haven't moved to typescript as stated in 0.71.0

@bezenson
Copy link

Oh, I spent so many time today thinking that one of my dependencies works wrong... Yeah, seems like this is React Native issue

@muzhaqi16
Copy link

I am having the same issue after upgrading, It takes about 2-4 after pressing something to respond, and the whole application is slow.

@muzhaqi16
Copy link

System:
    OS: Windows 10 10.0.22621
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900HK
    Memory: 14.89 GB / 31.69 GB
  Binaries:
    Node: 16.17.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK:
      AllowAllTrustedApps: Disabled
  IDEs:
    Android Studio: AI-213.7172.25.2113.9123335
    Visual Studio: Not Found
  Languages:
    Java: 18.0.2 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.0 => 0.71.0 
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

@bezenson
Copy link

I want to add, that not only buttons (touchable) works slowly. UI updates on active screen are throttling. And what is interesting - React Navigation transition animations works fine. And ScrollView works fine. Perf monitor shows -2 FPS sometimes (whatever that means)

@cortinico
Copy link
Contributor

Thanks for the issue report.
Several questions to help me investigate what's going on:

  1. Are you using Hermes or JSC?
  2. Is this happening also on a blank project created with npx react-native init RN071?

@bezenson
Copy link

  1. Hermes
  2. Yes. I started new project. You can see that links on default page work a bit slowly. But if you setup basic React Navigation with 2 screens you can see how long it takes to start switching screens

p.s. production build via ./gradlew assembleRelease works fine, no throttling. Only dev mode issue on android

@AlirezaHadjar
Copy link

I'm facing the same issue. On the bright side, everything is normal in the release apk.
By the way Cortinico I'm using Hermes.

@cortinico
Copy link
Contributor

cortinico commented Jan 13, 2023

@inferusvv Does the issue happens also if you disable Hermes (there is a flag in the app/android/gradle.properties file)?

@muzhaqi16
Copy link

muzhaqi16 commented Jan 13, 2023

I am using Hermes and the blank react-native project works fine.

@bezenson
Copy link

@cortinico Without Hermes it works fine.

I've set hermesEnabled=false at android/gradle.properties

@muzhaqi16
Copy link

I can also confirm that once Hermes is disabled, it works fine.
hermesEnabled=false

@cortinico
Copy link
Contributor

@cortinico Without Hermes it works fine.

Thanks for the confirmation. We'll be releasing 0.71.1 sometime next week with the fix for this. I believe the version of Hermes that comes with 0.71.0 is coming with Hermes in Debug mode which is causing this. I'll publish an update on this issue once we have the point release out.

For the time being you can either:

  • Disable Hermes
  • Stay on 0.70.x

@alkanyunus

This comment was marked as off-topic.

@manosKas

This comment was marked as off-topic.

@alkanyunus
Copy link

alkanyunus commented Jan 14, 2023

@saxahan send me an email with your issue, i may be able to help

Thanks for your helpful thought.
I managed to upgrade step by step by hands. Now I can run android and ios. However; ios cannot be installed from react-native run-ios, so I installed via Xcode.

And yes, android is super throttled now

@Stecken
Copy link

Stecken commented Jan 14, 2023

for me too, I realized that version 0.71 is super throttled.

When starting Metro, you already feel the lag.

@engmja

This comment was marked as duplicate.

@kelset kelset added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Jan 17, 2023
@github-actions
Copy link

⚠️ Missing Reproducible Example
ℹ️ It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner.

@cortinico
Copy link
Contributor

Hey @alabsi91 @inferusvv @muzhaqi16
I do have a potential fix, but I'm looking into getting a reproducer to validate this fix before we include it in 0.71.1.

So if you or anyone else could provide a reproducer, that would be greatly beneficial to verify this.

@cortinico cortinico added Tech: Hermes Hermes Engine: https://hermesengine.dev/ Needs: React Native Team Attention Impact: Bug The issue represents a bug somewhere labels Jan 17, 2023
@kelset
Copy link
Contributor

kelset commented Jan 19, 2023

as soon as maven publishes the artifacts, yeah... sadly there's some hiccup on their side so please keep an eye on #35904

@kelset
Copy link
Contributor

kelset commented Jan 19, 2023

ok artifacts are out now, 0.71.1 can be used and yes it should have the fix you need :)

@gvarandas
Copy link
Contributor

Can confirm it's been fixed on 0.71.1. 🎉

@emanueljcc
Copy link

I also confirm that the hermes is already adjusted in android and everything is going smoothly. It was also adjusted that it did not automatically launch the android emulator but in this version 0.71.1 it was already adjusted! thank you. :)

@kelset
Copy link
Contributor

kelset commented Jan 20, 2023

perfect, closing!

@AlirezaHadjar
Copy link

@AliZaib-Emumba I don't think the answer you're looking for is in this issue. This issue was caused by 0.71.0 which is resolved in 0.71.2. Your problem is probably different.

@furkanuzundev
Copy link

Is there anyone to occuring still this issue? I'm on 0.71.3 and it's very slow on Android.

@manosKas
Copy link

@furkanuzundev are you sure that in 0.70.6 is not happening?

@furkanuzundev
Copy link

@manosKas actually i didn't try on 0.70.6.I have updated from 0.67 to the latest version

@maxs1m

This comment was marked as off-topic.

@GuidoGagliardini
Copy link

i'm same issue on 0.70.6, very slow navigation in tabs. I can't find a solution, and I already have hermbesEnabled = false

@mayconline
Copy link

i'm same issue on 0.70.6, very slow navigation in tabs. I can't find a solution, and I already have hermbesEnabled = false

my solution was update to version 0.71.4 and cd android && ./grandlew clean

@nelsonhernandez20
Copy link

hermesEnabled=false I noticeably improved the performance of the app

@alkanyunus
Copy link

I was thinking like should we really use react-native for cross-platform app development anymore!

@HaddyYang
Copy link

HaddyYang commented May 5, 2023

0.71.4 has same issue

@marcin-piela-800
Copy link

0.71.8 has same issue

@GuidoGagliardini
Copy link

I think it is an important bug of the library. The app is practically unbrowsable at times.
0.70.6
I havehermbesEnabled = falseand newArchEnabled = false NOT WORK. Very slow.
no new?

@hassanannajjar
Copy link

hassanannajjar commented Jun 22, 2023

hermesEnabled = false
newArchEnabled = false
react-native 0.71.11
has the same issue Very slow.

@tapz
Copy link

tapz commented Jun 22, 2023

@GuidoGagliardini @hassanannajjar Maybe hermesEnabled works better than hermbesEnabled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact: Bug The issue represents a bug somewhere Needs: React Native Team Attention Platform: Android Android applications. Resolution: Fixed A PR that fixes this issue has been merged. Tech: Hermes Hermes Engine: https://hermesengine.dev/
Projects
None yet
Development

Successfully merging a pull request may close this issue.