Filip Hráček / Flutter performance /

Flutter Performance Book

Hi, I’m Filip. I worked on the Dart and Flutter teams at Google between 2016 and 2021, and I've been involved in Flutter performance, specifically, for over 7 years now. I've helped a few Flutter startups from performance-related trouble, and I've done more than my share of education and outreach.

You may recognize my face from the official Flutter YouTube channel. Some of the veterans of Flutter development might remember my Flutter performance talk at Flutter Europe 2020 or maybe they've read my old Medium.com articles on performance testing and raster thread optimization.

Here, I plan to put together a more coherent story of how to build performant Flutter apps and games. While most developers are probably fine knowing a few tips and tricks here and there — and can still deliver performant apps — I believe there’s a need for a subset of Flutter developers who become performance experts. Every organization using Flutter would benefit from a Winston Wolfe that knows what to do when things get slow or inefficient.

That could be you. Performance optimization is a vast and complicated topic but it’s learnable and — dare I say — fun.

Chapters

I’m writing the book in the open so that I can get feedback (email me, message me, or discuss). Here’s a very rough outline. Chapters that are drafted already are linked.

  1. Intro
  2. Performance, speed, efficiency
  3. Is Dart fast enough?
  4. Amdahl’s law
  5. Performance lottery
  6. Environment
  7. Statistics for performance engineers
  8. Performance profiling vs analysis vs benchmarking vs testing
  9. Benchmarking (tight loop/hot path, DoNotOptimizeAway)
  10. CPU Profiling (time -v, flame chart, perf, simpleperf)
  11. Timeline
  12. Raster thread optimization
  13. Memory (caching, memory pressure, memory leaks, GC, GC jank, WeakReference)
  14. Data structures (TypedData, Buffers, “Efficiency with Algorithms, Performance with Data Structures”)
  15. FFI
  16. Parallelism & Concurrency (Futures, async/await, isolates, “Dart is not multithreaded”, pragma(“vm:shared”))
  17. Pragmas
  18. Inlining
  19. Understanding Dart Kernel Representation
  20. SIMD / vectorization
  21. Interop with the platform (the other side of method channels, FFI)
  22. Continuous performance testing
  23. Sleights of hand (perceived performance magic tricks)
  24. A bag of tricks

No guarantees the book will ever be finished but if you want to be notified, subscribe to my mailing list.

(back to index)