[0.60.5] Upgrading to 0.60.5 slowes the debug build(not release build) #26228
Description
My project was currently on react-native 0.59.5
it's working fine (no significant delay) but I upgraded react-native to 0.60.5
, I tested debug and release build, observation
- I create a release build with Hermes disabled and the app is working fine(no lag).
- Unable to create release build with Hermes enabled, so can't test release build with Hermes engine
- Again tested debug build with and without Hermes engine, and in both scenario, app is lagging.
Below details for
debug
build (inrelease
build app is working fine)
I usedreact-devtools
profiler to debug mydebug
build
on previous version[0.59.5
] each commit maximum render time was below209ms
on new version[0.60.5
] commits are taking as long as800+ms
for same jobs
React Native version: 0.60.5
info Fetching system and libraries information...
System:
OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
Memory: 480.29 MB / 15.55 GB
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
SDKs:
Android SDK:
API Levels: 23, 26, 27, 28, 29
Build Tools: 23.0.1, 28.0.3, 29.0.0
System Images: android-28 | Google APIs Intel x86 Atom
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Steps To Reproduce
- clone the repo
git clone https://github.com/alexakasanjeev/magento_react_native.git
- cd into the project
cd magento_react_native
by default you will be in develop branch which is on react-native version
0.59.5
, if you will run this, you can see app is working fine
- change the branch
git checkout feature/react-native-upgrade
- delete all node_modules
rm -rf node_modules/
- install dependency
npm install
- Run the command
npm start
after packages are installed - In another terminal run
react-native run-android
As you can see the app is lagging and poorly responding as compare to develop
branch, and the only difference between develop
branch and feature/react-native-upgrade
is react-native and other packages have been upgraded
Describe what you expected to happen:
There should have been no change or the performance should have been better after upgrading to 0.60.5
but the app is lagging significantly
Snack, code example, screenshot, or link to a repository:
repo link
branch on version 0.59.5
branch on version 0.60.5
These are the screenshots from react-devtools
profiler, which shows some render are taking 800+ms
and no this is not the problem in my code logic, because I ran the same code with version 0.59.5 and no render is taking greater than 209ms
please help: I really don't know what's the problem is as the same logic is working fine in 0.59.5
version