Skip to content

Async, Performance & Rendering

Flutter aims for 60fps — and 120fps on capable displays. At 60fps a frame is ~16ms; at 120fps it is ~8ms. Everything your app does in a frame — building widgets, laying out, painting — has to fit in that window. Miss it and the frame is dropped: the user sees jank.

This module is about protecting that budget. Two disciplines do almost all the work:

flowchart TB
  budget["Frame budget
16ms at 60fps"] --> a["Async: feed data
without blocking the thread"]
  budget --> b["Rebuilds and CPU work:
keep them off the critical path"]
  a --> ok1["FutureBuilder, StreamBuilder"]
  b --> ok2["const, narrow setState,
RepaintBoundary, isolates"]
Two ways to blow the frame budget, and how to avoid each
LessonWhat you’ll learn
Futures & Streams in UIFutureBuilder and StreamBuilder, and the create-in-build trap
Rebuilds & performanceconst, setState scope, RepaintBoundary, and DevTools
AnimationsImplicit vs explicit animations and when each fits
Isolates & computeMoving CPU-heavy work off the UI isolate

Async work must not block the single UI thread, and rebuilds must not do more than they need to. Get those two right and Flutter is smooth almost for free; get them wrong and no amount of clever widgets will save you.

How much time does one frame get at 60fps?
What are the two disciplines that protect the frame budget?
What usually causes jank in a Flutter app?