expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
34.28k stars 5.48k forks source link

Performance regression since SDK 49 #24537

Open Kudo opened 1 year ago

Kudo commented 1 year ago

Minimal reproducible example

TBD (repro required)

Summary

This is an umbrella issue to keep track the performance regression mentioned at https://github.com/facebook/react-native/issues/36296, specifically starting from SDK 49 (React Native 0.72).

The information we have so far:

Trying to make an intersection of packages reported by people. the common packages are

[
  "@react-native-community/netinfo",
  "@react-navigation/bottom-tabs",
  "@react-navigation/native",
  "@react-navigation/native-stack",
  "expo",
  "expo-application",
  "expo-constants",
  "expo-device",
  "expo-font",
  "expo-linking",
  "expo-splash-screen",
  "expo-status-bar",
  "react",
  "react-native",
  "react-native-gesture-handler",
  "react-native-reanimated",
  "react-native-safe-area-context",
  "react-native-screens",
  "react-native-svg",
  "react-native-webview"
]

will need a minimal reproducible example to investigate the problem

Environment

TBD (repro required)

expo-bot commented 1 year ago

Thank you for filing this issue! This comment acknowledges we believe this may be a bug and there’s enough information to investigate it. However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

leymytel commented 1 year ago

Hi @Kudo.

Thank you for taking the time to investigate this performance issue.

To provide more context, I noticed a significant speed improvement on Android when I first tested the Expo 49 alpha version. However, subsequent releases, including the beta and the current stable versions, don't seem to maintain that level of performance.

Here's the environment info from when I created an issue at that time:

expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.4.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
npm: 8.19.4 - ~/app_name/node_modules/.bin/npm
Managers:
CocoaPods: 1.12.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
npmPackages:
@expo/metro-config: ^0.7.1 => 0.7.1
babel-preset-expo: ^9.3.2 => 9.5.0
expo: ^49.0.0-alpha.9 => 49.0.0-alpha.9
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.72.0 => 0.72.0
react-native-web: ~0.18.10 => 0.18.12
npmGlobalPackages:
eas-cli: 3.14.0
expo-cli: 6.1.0
Expo Workflow: bare
RohovDmytro commented 1 year ago

Not sure if related but I've noted a big regression in rendering ProxyBillingActivity.

I was using expo-in-app-purchases, migrated to react-native-purchases library, still seeing this issue.

Firebase Report on slow rendering frames:

image
Kudo commented 1 year ago

@leymytel did you remember which alpha version you tried?

@RohovDmytro ProxyBillingActivity is more from com.android.billingclient:billing or even google play services. after going this activity, it should not be in react-native area.

viveksc1994 commented 1 year ago

Reproducible demo - https://github.com/viveksc1994/expo-49-performance-issue/tree/main This project has a blank package.json file. you need to copy the whole text from package-48.json or package-49.json. To run in whichever SDK version.

This project shows as per below,

https://github.com/expo/expo/assets/10026278/6e6b9bfb-c41e-4fb3-8011-4f1054a29a4b

https://github.com/expo/expo/assets/10026278/0aad08b3-2f70-4d1e-bb77-31f01b3491cc

Kudo commented 1 year ago

that's a great repro. thanks @viveksc1994. i'll take a look this week.

Kudo commented 1 year ago

small update from my testing. i can repro the performance difference on expo-go when NO_OF_COMPONENTS=300 but not development build. will try to fine tune the NO_OF_COMPONENTS if i can repro the performance difference on development builds

kirtikapadiya commented 10 months ago

any updates ?

mgarciapsyntonize commented 7 months ago

any updates ????

mgarciapsyntonize commented 6 months ago

hi, any updates about this??

Buk1m commented 1 month ago

Hi, I just updated from 48 to 51 and the performance drop is pretty extreme. From smooth application to noticeable delay/stuttering on almost every click, especially just after changing the screens. The issue seems to affect the development builds and Expo Go.