React-native: ReactNative 0.59.9 -> 0.61.2 : much more slower on android release builds

Created on 15 Oct 2019  路  26Comments  路  Source: facebook/react-native

After upgrading to new version, the app transitions, touch element, open new screen is much more slower. It looks like it is in debug mode.

React Native version:
Binaries:
Node: 12.8.1 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.10.2 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 26, 27, 28
Build Tools: 27.0.3, 28.0.3
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
npmGlobalPackages:
react-native-cli: 2.0.1

I haven't hermes enabled (not working for now in on my side)

Bug Android

Most helpful comment

This issue is nearly a year old. The app is unusable on Android after doing this upgrade. Is there really no solution for this?

All 26 comments

I can confirm this. My team experiences up to 2.5-3 times slower performance on physical Android devices with Release variant.

Does this happen on both android AND iOS ? Could you help pin point to specific parts that make it slow - here is a guide - http://blog.nparashuram.com/2018/11/react-native-performance-playbook-part-i.html

Edit: Updated by @TheSavior to fix link to Ram's performance guide

It is Android issue only. I do not see a link to the guide. Please check your message above.

I'm seeing the same. I do not have hermes enabled, however all parts of the _Android_ app's UI (in release builds) are noticeably slower - after upgrading from RN 0.59.2 -> 0.60.5 .

Same problem on RN 0.59.9

For what it鈥檚 worth, this issue doesn鈥檛 currently have enough information for someone to debug the issue. If you can make a small reproducing case that would be very helpful.

We haven鈥檛 heard this complain widely so I think it might be something with your specific project.

Have you tried creating a new project to see if that is slow as well? What about after adding all of your 3rd party modules you are using?

This kind of investigation is needed for someone to be able to help.

I found the problems of my app UI very slower on a release build. I am using Ignite boilerplates to start my project.

I removed all

console.log()
console.tron.log()

and build release again my app working fine and smooth

we upgraded from 0.60.5 to 0.61.5 and had to rollback as android performance noticeably cratered

I'm going to close this issue as there isn't currently anything actionable here. If you have this problem with specifics like a repro or traces of where new time is being spent feel free to open a new issue.

I have exactly the same problem.
I made a new project and then transferred my previous code.
It works very well in debug mode, but unfortunately when I turn off debug mode or take the final output, performance drops sharply and the app speed slows down.

react navigation drawer That doesn't work at all

@TheSavior Please open again this issue. Because this problem is still not resolved.

https://stackoverflow.com/questions/53143502/react-native-app-lags-in-release-build-only

Some questions for all of you getting this issue, which happened in my case.

  1. Do you have different data (image size, product quantity) that loads in your development and production environment? The more you load products, and the size of the images might result different performance in this two environment.
  2. Do you install other package component or your custom component that use Animated react-native core component? If you use that, is it using useNativeDriver: true? If useNativeDriver: no, better upgrade the package or find another alternatives that use Animated component with useNativeDriver true. Also change your custom component and use useNativeDriver true. For further reading about useNativeDriver you can read this

In my case because there's a lot of products in production environment, and i used animated skeleton with useNativeDriver false, the performance in production is much slower.

same here

My app performed well on 0.59.9 on both platforms.
After upgrading to 0.62.2 it is much slower on both android. No significant difference on iOS.

Both debug mode and release mode.
Using Hermes didn't improve the performance.

I am reverting back to RN0.59.9 until the performance issues on the new version(s) is resolved.

The probable reason is described in #25986

Thanks @arthedza
In my configuration Hermes is disabled.

After enabling Hermes and rebuilding:

  • development build - much slower
  • release build - same performance as JSC (which is much slower than the performance with RN0.59.9)

As I wrote above, I am reverting back to RN0.59.9 until the performance issues on the new version(s) is resolved.
on iOS the performance is similar.

This issue is nearly a year old. The app is unusable on Android after doing this upgrade. Is there really no solution for this?

To summarize what people are complaining about here:

  • This issue has been opened because of very slow performance with 0.61.1 than with 0.59.9
  • I have experienced noticeably slower performance with 0.62.2 and 0.63.3 than with 0.59.9 on android, no expo. Hermes didn't help.
  • @chrisnojima experienced noticeably slower performance with 0.62.2 than with 0.59.9

@fxhrgco I suggest to modify the title to "ReactNative 0.59.9 -> 0.61.2/0.62.2/0.63.3: much slower..."
It seems that I am last victim... Everybody else is quite :)
Did anybody find a solution? Or at least an explanation to why and/or when this happens?

To summarize what people are complaining about here:

  • This issue has been opened because of very slow performance with 0.61.1 than with 0.59.9
  • I have experienced noticeably slower performance with 0.62.2 and 0.63.3 than with 0.59.9, no expo. Hermes didn't help on android.
  • @chrisnojima experienced noticeably slower performance with 0.62.2 than with 0.59.9

@fxhrgco I suggest to modify the title to "ReactNative 0.59.9 -> 0.61.2/0.62.2/0.63.3: much slower..."
It seems that I am last victim... Everybody else is quite :)
Did anybody find a solution? Or at least an explanation to why and/or when this happens?

I am also facing this issue . There is no proper solution of this and I am trying to downgrade then getting lots of issue . I am facing lagging in 0.63.3 rn version

My app performed well on 0.59.9 on both platforms.
After upgrading to 0.62.2 it is much slower on both android and iOS.

Both debug mode and release mode.
Using Hermes didn't improve the performance.

I am reverting back to RN0.59.9 until the performance issues on the new version(s) is resolved.

I also wants to do that but facing app crash issue . What steps you did to downgrade app.

@Anujmoglix try to open a new project and then past all your component there .. a lot of work but i think its better way ....
i am also facing the slow of react native 0.63.3

Why React native team is not looking into it ? It is major issue and it is creating negative impression . @jeffelector that is a solution but how I will check dependent version ?

Why React native team is not looking into it ? It is major issue and it is creating negative impression.

I believe that they need an example (repo) that demonstrates the problem.

I upgraded to 0.63.3 and the extreme slowness appears to have gone away. Still have no idea what fixed it for me...

Good for you...
Didn't help me at all.

BTW, according to my measurements:

  • On android, any version beyond 0.59.9 is ~10 (ten...) times slower than 0.59.9 (measured on LG V20)
  • iPhone 7, which is supposed to be ~3 times faster than LG V20, is ~4 times slower than the LG V20, which means that it gives a similar performance to android on any version beyond 0.59.9

Hermes didn't improve my app's performance.

To make it short: my app with android using RN 0.6x.x is 10 times slower than using RN 0.59.9

Development on RN ( especially rn cli ) for android is very terrible. The same problem in my case too.

Was this page helpful?
0 / 5 - 0 ratings