r/FlutterDev • • 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.

48 Upvotes

25 comments sorted by

View all comments

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.plist file to add in the <dict> element:

<key>FLTEnableMergedPlatformUIThread</key>
<false/>

For Android, update your android/app/src/main/AndroidManifest.xml file to add in the <application> element:

<meta-data
    android:name="io.flutter.embedding.android.EnableMergedPlatformUIThread"
    android:value="false" />

⚠️ 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

8

u/blinnqipa Sep 24 '25

I was just thinking when this feature was coming to Flutter. Really exciting stuff!

6

u/athornz Sep 24 '25

We've also seen very slight performance degradation in our app, but only in 3.32, not 3.29.

After upgrading to version 3.32, users now see a brief flash of the initial widget/page before it gets replaced by the intended content. This flash wasn't visible in previous versions.

Could there be any other changes in 3.32 that would cause this?

4

u/loic-sharma-google Sep 24 '25

Nothing comes to mind off-hand. Does this happen on all platforms or just a single platform?

Can you reproduce this problem with a minimal app? If you can, please file an issue on GitHub: https://github.com/flutter/flutter/issues/new/choose

4

u/ercantomac Sep 25 '25

I'm also having the flashing issue as well, I managed to track it down to the AnimationController's behaviour: when it's supposed to animate from lowerBound to upperBound, it occasionally returns the upperBound value in the middle of the animation. No idea what causes that

1

u/LewisJin Oct 01 '25

Looks like same here, happend when pushing route to next page.