Flutter 3.41 is live! Check out theFlutter 3.41 blog post!
Performance FAQ
Frequently asked questions about Flutter performance
This page collects some frequently asked questions about evaluating and debugging Flutter's performance.
- Which performance dashboards have metrics that are related to Flutter?
- How do I add a benchmark to Flutter?
- What are some tools for capturing and analyzing performance metrics?
- 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 triggerssaveLayerImageFilter- Also seePerformance best practices
- How do I tell which widgets in my Flutter app are rebuilt in each frame?
- Set
debugProfileBuildsEnabledtrue inwidgets/debug.dart. - Alternatively, change the
performRebuildfunction inwidgets/framework.dart to ignoredebugProfileBuildsEnabledand always callTimeline.startSync(...)/finish. - If you use IntelliJ, a GUI view of this data is available. SelectTrack widget rebuilds, and your IDE displays which the widgets rebuild.
- 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()method, as demonstrated inParse JSON in the background cookbook.
- Spawn another isolate using the
- How do I determine my Flutter app's package size that a user will download?
- How do I see the breakdown of the Flutter engine size?
- Visit thebinary size dashboard, and replace the git hash in the URL with a recent commit hash fromFlutter's 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=... - Note a known issue viewing screenshots:
- Issue 21237: Doesn't record images in real devices.
- To analyze and visualize the SKP file, check out theSkia WASM debugger.
- Run
How do I retrieve the shader persistent cache from a device?
- On Android, you can do the following:
adb shellrun-as <com.your_app_package_name>cp <your_folder> <some_public_folder, e.g., /sdcard> -radb pull <some_public_folder/your_folder>
- On Android, you can do the following:
How do I perform a trace in Fuchsia?
Was this page's content helpful?
Unless stated otherwise, the documentation on this site reflects Flutter 3.38.6. Page last updated on 2025-01-17.View source orreport an issue.