By inspecting performance, you can understand what is happening in an app and ensure it meets your expectations.
Android provides several tools you can use to inspect your app's performance. When getting started, we recommend you focus on one area at a time during inspection.
These areas can include:
- App startup
- Slow rendering (jank)
- Screen transitions and navigation events
- Long running work
- Operations in the background, such as I/O and networking
Alternatively, you can inspect critical user journeys of your app's workflow. This can help you gain a holistic understanding of where performance and expectations don't align.
There are two main approaches when inspecting performance, manual and automated. It's likely that you start with manual debugging when inspecting a new area.
After deciding which area of your app to inspect, you can use a variety of tools to identify what exactly is happening.
The most comprehensive tool to inspect performance on Android 9 devices and later is Perfetto. Perfetto provides you with the highest possible detail of tracing information. By using powerful filters, you can adjust that level of detail to your needs. For more information about how to capture traces from Android devices, see the Quickstart: Record traces on Android guide.
The Android profilers built-in to Android Studio can also provide some valuable insights into your app's performance where the level of detail can be limited to your app, or when running on devices lower than Android 9.
In addition to manual inspection, you can set up automated tests to collect and aggregate performance data. This helps you understand what users are actually seeing and identify when regressions may occur. For more information about setting up automated performance tests for your app, see Benchmark your app.
- Performance debugging - MAD skills series
- Capture a trace in Android Studio
- Navigate a report
- Macrobenchmark overview
- Microbenchmark overview