react-native-community / cli

The React Native Community CLI - command line tools to help you build RN apps
MIT License
2.41k stars 905 forks source link

Performance degradation in android AAB release: App runs slower when installed from Playstore vs APK #2515

Open shrutijasoliya opened 1 month ago

shrutijasoliya commented 1 month ago

Environment

info Fetching system and libraries information... System: OS: macOS 14.5 CPU: (8) arm64 Apple M2 Memory: 92.45 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.16.0 path: ~/.nvm/versions/node/v20.16.0/bin/node Yarn: version: 1.22.22 path: ~/.nvm/versions/node/v20.16.0/bin/yarn npm: version: 10.8.1 path: ~/.nvm/versions/node/v20.16.0/bin/npm Watchman: version: 2024.09.09.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms:

Description

I am experiencing significant performance issues with my React Native app when distributed as an Android App Bundle (AAB) through the Google Play Store. The app works fine when tested locally on the Android simulator or installed directly via APK, but becomes noticeably slower and less responsive after being installed from the Play Store. This issue is exclusive to Android, with no noticeable performance impact on iOS.

Reproducible Demo

Due to the private nature of my company's project, I cannot share the source code, but I have recorded screencasts demonstrating the performance difference between the APK (installed directly) and the AAB (installed via the Play Store). Please refer to the following video links for a visual representation of the issue:

These screencasts show identical user flows on the same device, highlighting the noticeable difference in performance between the two versions.

Actual Behavior: The app performs significantly slower when installed from the Play Store (via AAB), affecting user experience.

Expected Behavior : The app should perform just as smoothly as it does when running in the Android simulator or when installing the APK directly.

Package.json


  "dependencies": {
    "@aws-amplify/react-native": "^1.0.4",
    "@fawazahmed/react-native-read-more": "^3.0.3",
    "@gorhom/bottom-sheet": "^4.5.1",
    "@react-native-async-storage/async-storage": "^1.19.6",
    "@react-native-clipboard/clipboard": "^1.13.1",
    "@react-native-community/netinfo": "^11.1.0",
    "@react-native-firebase/analytics": "^18.7.3",
    "@react-native-firebase/app": "^18.7.3",
    "@react-native-masked-view/masked-view": "^0.3.0",
    "@react-navigation/bottom-tabs": "^6.5.11",
    "@react-navigation/drawer": "^6.6.6",
    "@react-navigation/native": "^6.1.9",
    "@react-navigation/native-stack": "^6.9.17",
    "@reduxjs/toolkit": "^1.9.7",
    "@sentry/react-native": "^5.19.2",
    "@wow-star/utils": "^1.0.0-cms-beta.8",
    "aws-amplify": "^6.0.4",
    "axios": "^1.6.8",
    "crypto-js": "^4.2.0",
    "moment": "^2.29.4",
    "react": "18.2.0",
    "react-native": "0.72.7",
    "react-native-code-push": "^8.2.1",
    "react-native-confirmation-code-field": "^7.3.2",
    "react-native-device-info": "^10.13.1",
    "react-native-dotenv": "^3.4.9",
    "react-native-dropdown-picker": "^5.4.6",
    "react-native-fast-image": "^8.6.3",
    "react-native-fbsdk-next": "^12.1.4",
    "react-native-flash-message": "^0.4.2",
    "react-native-gesture-handler": "^2.13.4",
    "react-native-get-random-values": "^1.10.0",
    "react-native-image-picker": "^7.1.0",
    "react-native-image-viewing": "^0.2.2",
    "react-native-in-app-review": "^4.3.3",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-modal": "^13.0.1",
    "react-native-moengage": "^9.1.0",
    "react-native-moengage-cards": "^2.1.0",
    "react-native-moengage-geofence": "^4.1.0",
    "react-native-moengage-inbox": "^3.1.0",
    "react-native-otp-verify": "^1.1.8",
    "react-native-popover-view": "^5.1.8",
    "react-native-progress": "^5.0.1",
    "react-native-razorpay": "^2.3.0",
    "react-native-reanimated": "^3.5.4",
    "react-native-reanimated-carousel": "^3.5.1",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "^4.7.4",
    "react-native-screens": "^3.27.0",
    "react-native-share": "^10.0.2",
    "react-native-skeleton-placeholder": "^5.2.4",
    "react-native-splash-screen": "^3.3.0",
    "react-native-star-rating-widget": "^1.7.3",
    "react-native-svg": "^14.0.0",
    "react-native-tracking-transparency": "^0.1.2",
    "react-native-vector-icons": "^10.0.2",
    "react-native-version-check": "^3.4.7",
    "react-native-video": "^5.2.1",
    "react-native-webview": "^13.7.0",
    "react-redux": "^8.1.3",
    "redux": "^4.2.1",
    "redux-persist": "^6.0.0",
    "redux-saga": "^1.2.3",
    "sp-react-native-in-app-updates": "^1.4.0",
    "uuid": "^10.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/eslint-config": "^0.72.2",
    "@react-native/metro-config": "^0.72.11",
    "@tsconfig/react-native": "^3.0.0",
    "@types/react": "^18.0.24",
    "@types/react-native-razorpay": "^2.2.4",
    "@types/react-native-version-check": "^3.4.8",
    "@types/react-native-video": "^5.0.20",
    "@types/react-test-renderer": "^18.0.0",
    "@typescript-eslint/eslint-plugin": "^6.15.0",
    "@typescript-eslint/parser": "^6.15.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.19.0",
    "eslint-plugin-react": "^7.33.2",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.76.8",
    "prettier": "^2.4.1",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  }
szymonrybczak commented 1 month ago

Hey, this kind of issues should be reported in React Native Core. I understand that you cannot share source code of your project, but maybe you can try creating a reproducible example that will show the difference 🙏