Frequently asked questions
- Which performance dashboards have metrics that are related to Flutter?
- https://flutter-dashboard.appspot.com/
- https://flutter-flutter-perf.skia.org/t/?subset=regressions
- https://flutter-engine-perf.skia.org/t/?subset=regressions
- https://flutter-dashboard.appspot.com/benchmarks.html (to be retired)
- How do I add a benchmark to Flutter?
- What are some tools for capturing and analyzing performance metrics?
- Dart DevTools
- Apple instruments
- Linux perf
- [Chrome tracing (enter
about:tracing
in your Chrome URL field)][tracing] - Android systrace (
adb systrace
) - Fuchsia
fx traceutil
- https://ui.perfetto.dev/
- https://www.speedscope.app/
- My Flutter app looks janky or stutters. How do I fix it?
- What are some costly performance operations that I need to be careful with?
-
Opacity
,Clip.antiAliasWithSaveLayer
, or anything that triggers saveLayer ImageFilter
- Also see Performance best practices
-
- How do I tell which widgets in my Flutter app are rebuilt in each frame?
- Set
debugProfileBuildsEnabled
true in widgets/debug.dart. - Alternatively, change the
performRebuild
function in widgets/framework.dart to ignoredebugProfileBuildsEnabled
and always callTimeline.startSync(...)/finish
. - If you use IntelliJ, a GUI view of this data is available. Select show widget rebuild information, and you will see which widgets rebuild visually in your IDE.
- Set
- How do I query the target frames per second (of the display)?
- How to solve my app’s poor animations caused by an expensive Dart async
function call that is blocking the UI thread?
- Spawn another isolate using the
compute
property
- Spawn another isolate using the
- How do I determine my Flutter app’s package size that will be downloaded by a user?
- How do I see the breakdown of the Flutter engine size?
- Visit the binary size dashboard, and replace the git hash in the URL with a recent commit hash from GitHub commits.
- How can I take a screenshot of an app that is running and export it
as a SKP file?
- Run
flutter screenshot --type=skia --observatory-uri=...
- Known issue of a SKP screenshot:
- Doesn’t record images in real devices Issue 21237
- To analyze and visualize the SKP file, visit https://debugger.skia.org/.
- Run
- How do I retrieve the shader persistent cache from a device?
- On Android, you can do the following:
adb shell run-as <com.your_app_package_name> cp <your_folder> <some_public_folder, e.g., /sdcard> -r adb pull <some_public_folder/your_folder>
- On Android, you can do the following:
- How do I perform a trace in Fuchsia?
[tracing]: https://www.chromium.org/developers/how-tos/trace-event-profiling-tool