Flutter Performance Updates in 2019

Shams Zakhour
Flutter
Published in
6 min readJul 31, 2020

By Yuqian Li and Shams Zakhour

Being fast is a key pillar to Flutter. This article highlights performance improvements from the second half of 2019 implemented by folks from the Flutter community. (Yes, this is late, but it’s better late than never!)

If you’ve helped out with performance in 2020, we will cover that in a future post. We hope that sharing this with you, the Flutter community, inspires you to help us with this effort!

Q4 (Oct-Dec) 2019

Quantified improvements

70% memory reduction in fast scrolling through large images

70% memory reduction in fast scrolling through large images
contributors:
liyuqian, dnfield, chinmaygarde

40% reduction in CPU/GPU usages for simple iOS animations
contributors:
flar, liyuqian, hixie, chinmaygarde

41% speedup for caret performance
contributors:
garyqian, liyuqian, justinmc

10% speedup for list scrolling by fixing raster cache throttling
contributors:
liyuqian, chinmaygarde, flar, cyanglaz, zsunkun

37x speedup for cached benchmarks load time (Dashboard)
contributors:
caseyhillers, tvolkert, digiter, jonahwilliams

2.3x speedup for building APKs
contributors:
jonahwilliams, blasten, zanderso, xster

+103 performance metrics recorded per Flutter engine commit
contributors:
liyuqian, digiter, keyonghan, godofredoc, cbracken

20% app size reduction
contributors:
mraleph, alexmarkov, rmacnak-google, mkustermann, sstrickl, aartbik

108x speedup on Dart FFI performance
contributors:
dcharkes, mkustermann, sjindel, alexmarkov

10–15% performance improvement in tight code
contributors:
aartbik, mkustermann, mraleph

2.2x speedup in flutter test with new incremental serializer
contributors:
jensjoha, alexmarkov

10% faster Kernel binary serialization by giving inlining hints to Dart VM JIT
contributors:
jensjoha, johnniwinther

30% performance improvement on async heavy code
contributors:
cskau-g, mkustermann, mraleph

Other improvements

Fixed a memory leak when using PlatformView on iOS

Fixed a memory leak when animation is playing on iOS

Fixed more iOS memory leaks

Started revamping Performance pages on flutter.dev and added instructions on measuring app size.

Corrected the first frame waiting logic and measurement

DevTools added full timeline mode with support for async and recorded tracing.

IntelliJ plugin fixed 120FPS support

Many timeline tracing improvements thanks to ByteDance

Q3 (July-Sept) 2019

Quantified improvements

1.5–5x speedup for rect & point transformations
contributors:
flar, yjbanov, dnfield

N/2–1 fewer missed frames on iPhone X/Xs scrolling
contributors:
liyuqian, chinmaygarde, gaaclarke

15% faster engine start and shutdown with parallel initialization
contributors:
gaaclarke, chinmaygarde, liyuqian

14.57ms faster startup and 8MB smaller memory usage for shader warm-up
contributors:
gaaclarke, liyuqian, dnfield

1.02%-8.04% reduction in code size
contributors:
johnniwinther, aartbik, rmacnak-google, jensjoha, alexmarkov, mkustermann

Up-to-2x increase for Flutter on Fuchsia FPS; improved frame scheduling
contributors:
dreveman, amott, rosswang, mikejurka

Quantified regression fixes

3x speedup for BackdropFilter on iOS
contributors:
lhkbob, liyuqian, flar

To achieve some huge improvements (3x for example), the bad performance of the old state probably played an equally important role as the hard work in Q3 (July-Sept) 2019. We also marked some improvements as non-trivial fixes of equally big regressions. Nevertheless, we appreciate such work. Without it, we’d continue to have bad performance and regressions. We don’t want the big improvements to dwarf the smaller improvements. They just didn’t have a very bad old performance to start with, which in some sense is a good thing.

Other improvements

Conclusion

57% of respondents are very satisfied with Flutter. In total, 94% are positively satisfied.

Thanks to these contributions from our community, the proportion of users positively satisfied with Flutter’s mobile performance increased from 85% in Q3 2019 to 92% in 2020. Despite our best effort, some performance contributions in Q3-Q4 2019 may be missed in this update. Please don’t hesitate to let us know of any missing contributions, and we’ll put them in the next update.

--

--