← Back to all writing
1 min read
5 Mistakes That Slow Down Your Flutter App
Common performance pitfalls I see in production codebases, and how to fix them.
Most Flutter apps are fast until they are not. These are the five causes I find most often when profiling a janky build.
- Rebuilding whole subtrees — a
setStatehigh in the tree repaints everything below it. Push the stateful widget down. shrinkWrap: trueinside a scroll view — this quietly measures every child on every frame.- Unbounded
ListView(children: [...])— useListView.builderand build lazily. - Decoding JSON on the UI isolate — move it to a background isolate with
compute. - Images at full resolution — a 4000px photo in a 200px slot costs memory and decode time every frame.
Fix the first one and you usually fix half the jank.