Skip to content

[0.60.5] Upgrading to 0.60.5 slowes the debug build(not release build) #26228

Closed
@sanjeevyadavIT

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

  1. I create a release build with Hermes disabled and the app is working fine(no lag).
  2. Unable to create release build with Hermes enabled, so can't test release build with Hermes engine
  3. Again tested debug build with and without Hermes engine, and in both scenario, app is lagging.

Below details for debug build (in release build app is working fine)
I used react-devtools profiler to debug my debug build
on previous version[0.59.5] each commit maximum render time was below 209ms
on new version[0.60.5] commits are taking as long as 800+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

  1. clone the repo git clone https://github.com/alexakasanjeev/magento_react_native.git
  2. 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

  1. change the branch git checkout feature/react-native-upgrade
  2. delete all node_modules rm -rf node_modules/
  3. install dependency npm install
  4. Run the command npm start after packages are installed
  5. 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

Screenshot from 2019-08-28 12-59-59

please help: I really don't know what's the problem is as the same logic is working fine in 0.59.5 version

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions