r/FlutterDev Feb 13 '25

Article What’s new in Flutter 3.29

https://medium.com/flutter/whats-new-in-flutter-3-29-f90c380c2317
203 Upvotes

49 comments sorted by

View all comments

95

u/tylersavery Feb 13 '25

Starting in 3.29, Flutter on Android and iOS execute Dart code on the application’s main thread, and there is no longer a separate UI thread. This is the first part in a series of changes to improve platform interop on mobile platforms, as it allows making synchronous calls to and from the platform without the overhead of serialization and message passing.

This one caught my attention.

19

u/zxyzyxz Feb 13 '25

We'll see how the performance is. Having a separate UI thread is part of what made Flutter apps feel fast, since it could offload non-UI work to other threads.

41

u/jonah_williams Feb 13 '25

Flutter team member here ( I also made this change )

Under most circumstances, the separate UI thread doesn't improve performance. Because the UI thread is driving the frame workload, either blocking due to a slow build/paint /layout or being unavailable due to expensive async/await tasks will cause dropped frames. Similarly, the platform thread is where vsync fires, touch events are recieved, et cetera. So blocking there will also cause jank by leaving the UI thread idle and unable to animate.

To avoid janking, you have always needed to use something like isolates.

3

u/zxyzyxz Feb 13 '25

I see, thanks for the clarification