Performance best practices

Minimize expensive operations

Control build() cost
Use saveLayer() thoughtfully

Why is saveLayer expensive?
When is saveLayer required?
Debugging calls to saveLayer
Minimizing calls to saveLayer


Minimize use of opacity and clipping
Implement grids and lists thoughtfully

Be lazy!
Avoid intrinsics


Minimize layout passes caused by intrinsic operations

What is an intrinsic pass?
Debugging intrinsic passes
Avoiding intrinsic passes


Build and display frames in 16ms

Pitfalls

Resources

Note:
  To learn how to use the Performance View
  (part of Flutter DevTools)
  for debugging performance issues,
  see Using the Performance view.