Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App lags when navigating to different screen #2298

Open
zhenhao-ola opened this issue Sep 19, 2024 · 4 comments
Open

App lags when navigating to different screen #2298

zhenhao-ola opened this issue Sep 19, 2024 · 4 comments

Comments

@zhenhao-ola
Copy link

zhenhao-ola commented Sep 19, 2024

Platform

Flutter Mobile

Obfuscation

Enabled

Debug Info

Enabled

Doctor

➜  ~ flutter doctor -v
[!] Flutter (Channel main, 3.7.13-0.0.pre.2, on macOS 14.4 23E214 darwin-arm64, locale en-MY)
    • Flutter version 3.7.13-0.0.pre.2 on channel main at /Users/zhenhao.ng/OlaProjects/flutter
    ! Upstream repository git@github.com:olachat/flutter.git is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to git@github.com:olachat/flutter.git to dismiss this error.
    • Framework revision 1a4884310c (12 months ago), 2023-10-04 12:28:33 +0800
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/zhenhao.ng/Library/Android/sdk
    • Platform android-35, build-tools 34.0.0
    • Java binary at: /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (Zulu 8.74.0.17-CA-macos-aarch64) (build 1.8.0_392-b08)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode 15.3.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] VS Code (version 1.92.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.96.0

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64  • Android 14 (API 34) (emulator)
    • macOS (desktop)             • macos         • darwin-arm64   • macOS 14.4 23E214 darwin-arm64
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 129.0.6668.58
    ! Error: Browsing on the local area network for Flamy's iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 3 categories.

Version

8.6.0

Steps to Reproduce

  • Use the app for more than approximately 20 minutes.
  • App will start to lag when navigating to other screen.

This issue only starts happening when we enabled Sentry in our new version of app.

When checking with CPU profiler, it seems Sentry is using much of the time. I'm wondering if SentryNavigatorObserver is causing our app to lag?

Image

Looks related to this PR comment with span_frame_metrics_collector.dart:
#2106 (comment)

Thanks in advance.

Expected Result

The app should not lag when navigating to other screen.

Actual Result

After using the app for more than approximately 20 minutes, the app will start lagging when navigating to other screen,

Are you willing to submit a PR?

None

@buenaflor
Copy link
Contributor

could you try disabling enableFramesTracking in the initializet

@zhenhao-ola
Copy link
Author

@buenaflor do we have expected ETA for this fix?

@buenaflor
Copy link
Contributor

I'll look at it asap so that we can get a fix out this

Does it only happen after using the app continuously for a long time?

@zhenhao-ola
Copy link
Author

It only happens after using app for long time. The app becomes smooth back after restarting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Status: Needs Discussion
Development

No branches or pull requests

2 participants