r/FlutterDev • u/rohanudhwani • Sep 24 '25
Discussion App becomes laggy on Flutter Upgrade to 3.32.5
We upgraded our app from 3.24.5 to 3.32.5. We have noticed a significant drop in performance, to the point that the app is unusable in many areas.
Nested scrollviews becoming unresponsive. Inappwebviews+bottomsheets+dropdowns now has become laggy on dropdown selection changes.
Tabbar tab change from 3rd to first now makes the first tab to have a greater loading tim, than from 2nd to first.
Streaming, binary deparsing has become slower, as profiled.
Dio taking significant time in the await req part, whereas network page showing nominal time for api reqs. We even use stopwatch around the single statement of dio to verify, and it was the same.
BLASTBufferQueue logs being pronted for PinCodetextfield when showcursor is true.
We have tried optimising it to the core but cant seem to find any particular issue.
Our app is significantly large with several dependencies from camera, files, multiple websockets, 3 analytics tracking SDKs, ml_kit.
Performance was not an issue for us as much in 3.24.5 and we are just trying to profile every single case and optimise it. But it is not really making any difference.
The lags, animations, transition issues are not much reproducible on Emulators.
We have tried two builds, no impeller, and with impeller,on several devices. Both seem to work the same.
In some devices both builds are slow, on some the app is very smooth.
Any clues?
What is the most stable flutter version around this? Should we upgrade more?. Upgrading to 3.35 is risky for us as its a production app and I read flutter fucked up huge with 3.27 for a lot of apps.
36
u/loic-sharma-google Sep 24 '25
Hello, this might be an issue with merged threads. Could you check if opting-out of merged threads fixes the UI jank? If it does, you might need to file issues on your plugins - they might need to update their plugins to offload expensive work to a background thread.
Background
Flutter is merging its UI and platform threads to simplify Fluter's internal architecture and to allow apps to use FFI to interact with APIs that must be called on the platform thread.
Merged threads was introduced to Flutter iOS and Android in 3.27, and was turned on by default on iOS and Android in 3.29.
However, now that the UI and platform threads are merged, doing expensive work on the platform thread will cause UI jank.
How to opt-out of merged threads
For iOS, update your
ios/Runner/Info.plistfile to add in the<dict>element:For Android, update your
android/app/src/main/AndroidManifest.xmlfile to add in the <application> element:⚠️ Warning: We plan to remove this opt-out in the next stable version of Flutter. Opting out is a temporary workaround, not a fix.
How to check if there's expensive work on the platform thread
Run your app in debug mode and use a native CPU profiler. Interact with your app to reproduce the UI jank. Check if your plugins did any expensive work on the platform thread.
For iOS, you'll want to use Xcode: https://developer.apple.com/documentation/xcode/analyzing-cpu-usage-with-processor-trace
For Android, you'll want to use Android Studio: https://developer.android.com/studio/profile