facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 908 forks source link

Android - Slow app performance and Lag on 1.0.X #657

Open RocKhalil opened 4 years ago

RocKhalil commented 4 years ago

🐛 Bug Report

On older android devices, whenever we update the package to 1.0.X, the app starts lagging. Loaders get slower, flatlists starts lagging, etc...

If we downgrade back to 0.10.1, the app stays slow and lagging (even if we clean gradle and remove node_modules).

We should create a new project, move all the packages and code, and the app re-works fine.

I'm not sure how to explain it in a better way, but this is what's currently happening. We've moved the code from project to project around 10 times to finally know that the bug is from react-native-fbsdk.

Environment

System:
    OS: macOS 10.15
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Memory: 308.57 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.15.1 - ~/.nvm/versions/node/v10.15.1/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.15.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
    Android SDK:
      API Levels: 22, 23, 24, 25, 26, 27, 28, 29
      Build Tools: 19.1.0, 20.0.0, 21.1.2, 22.0.1, 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.1, 24.0.2, 24.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0, 28.0.3, 29.0.0, 29.0.2
      System Images: android-26 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
      Android NDK: 20.0.5594570
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5791312
    Xcode: 11.1/11A1027 - /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
abdullahizzuddiin commented 4 years ago

Hi, @RocKhalil

Have you got any solution?

I got same problem with you. The one and only solution that worked for me only remove this package from my app. But, at this time, my app still need this package (only for FB Login feature).

anjar10 commented 4 years ago

Same issue here. Has anyone found the solution yet?

RocKhalil commented 4 years ago

Nothing yet, we tried everything and still couldn't find any solution for it.

omererbil commented 4 years ago

just disable the auto logging, To disable the auto logging, add these to your manifest:

<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled" android:value="false"/>

RocKhalil commented 4 years ago

@omererbil just tried it, still the same..

roysG commented 3 years ago

@omererbil , Fix the problem!