Repository navigation
Description
Details
Hy. We are working on a social media app with a blockchain backend. After trying to upgrade the Flutter version from v2.5.3, the application started working extremely slow in --debug mode. On the run --release and run --profile it works just fine.
The first stable version that we tried upgrading to was v2.8.0, but the same problem occurred in different versions (v2.10.5 / v3.0.0 / v3.0.1).
We ran application from both Windows and MacOS on different Android and iOS phones, and the outcome was the same every time.
We had a suspicion that some of the used packages from pubspec.yaml caused this slowdown, so we went through pubspec.yaml file and commented out the package by package and then ran the app, trying to isolate which one was causing problems. We tried running the app without any package updates, and debug mode was slow.
Only then we update all dependencies (explicit and transitive) to the highest possible version using flutter pub upgrade and did flutter pub cache repair if the upgrade was corrupt.
None of that helped, and it seems that flutter might be the problem because it is the last thing that’s left.
We tried deleting flutter from the computer and then downloading a new clean version from the website, which was mentioned in this: https://stackoverflow.com/questions/64011934/running-debugging-flutter-app-very-slow-after-upgrading-to-latest-sdk-version-1 stack overflow question.
Does anyone know if there were some changes to the flutter debug mode introduced in Flutter v2.8.0 because the application is running good in release and profile mode?
Similar questions, with applications running slow after upgrading SDK, are closed without any provided solution.
Also, other questions related to application performances suggest running a profiler and trying to see what is slowing the application down.
That does not look like a good solution because even though that application can be accelerated, which one could not, it is running fast at --profile and --release mode and slow in --debug.
The problem that we are facing now is that, in theory, we can be stuck at Flutter 2.5.3 for a long time, or even worse, forever.
We want to take advantage of all the new features provided to developers with every new Flutter release, and like this, we could not. Continuing to develop on v2.5.3 and then upgrading Flutter and refactoring code, building APK from that version and publishing it does not seem like a good solution.
Target Platform:Android and iOS
Devices:multiple Android and iOS physical devices
Output of running flutter doctor -v
[✓] Flutter (Channel stable, 3.0.1, on macOS 12.4 21F79 darwin-arm, locale
en-RS)
• Flutter version 3.0.1 at /Users/user/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fb57da5f94 (7 days ago), 2022-05-19 15:50:29 -0700
• Engine revision caaafc5604
• Dart version 2.17.1
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version
32.1.0-rc1)
• Android SDK at /Users/user/Library/Android/sdk
• Platform android-32, build-tools 32.1.0-rc1
• Java binary at: /Applications/Android
Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• 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
• Java version OpenJDK Runtime Environment (build
11.0.12+0-b1504.28-7817840)
[✓] Connected device (3 available)
• M2004J19C (mobile) • 9f95dc050506 • android-arm64 • Android 11 (API 30)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79
darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome
101.0.4951.64
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Activity
exaby73 commentedon May 27, 2022
Hello @johnbbg. Can you provide a minimal, reproducible example along with steps to reproduce this issue? Along with that, can you provide a video demonstrating this issue as well as a timeline trace from the devtools?
maheshj01 commentedon May 27, 2022
See "How to Collect and Read Timeline Traces" on this blog post:
https://medium.com/flutter/profiling-flutter-applications-using-the-timeline-a1a434964af3#a499
github-actions commentedon Jun 17, 2022
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
github-actions commentedon Jul 1, 2022
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.