I am trying to find the UI rendering time for each Activity in android. I come to know that can analyses the performance using of systrace or perfetto. But the problem is find the UI rendering part from that huge graph. Can any one help me to find the UI rendering time from systrace or perfetto.
Asked
Active
Viewed 582 times
1 Answers
1
System Trace includes data from all processes running on the device, so first you need to find the relevant processes. Here's a couple of places to get you started:
- Your app process. The name should look like com.your.app. Expand that process and then you want to focus on the main thread (same name as the process name) and a thread called RenderThread. Screenshot of the RenderThread and main thread in Android Studio
- The SurfaceFlinger process. It's a process running on Android devices, responsible for compositing surfaces to the display. Expand that process and look for its main thread and a myriad of counters (e.g. VSYNC, SurfaceView) to help you troubleshoot rendering issues. Screenshot of SurfaceFlinger counters in Perfetto
To know exactly what's causing the UI rendering issue requires knowledge of how your app works and some trial-and-error. These videos might help you:
- Performance Analysis Using Systrace: https://youtu.be/9kNhB_z704I
- Troubleshooting app performance issues with System Trace in Android Studio (this one focuses on Android Studio): https://youtu.be/EjmIit_amnE
- Debugging Application Performance (this one is bit old and still uses the legacy systrace tool) : https://youtu.be/qXVxuLvzKek

Yi Yang
- 421
- 2
- 6