S01E02 Rendering Performance Rendering performance issues
Rendering performance issues are the most common issues with app development.
The system attempts to draw activity every approximately 16ms (1/60 seconds), and if it is not possible to successfully draw a new diagram every 16ms, the phenomenon of frame drop occurs. That is, the app every 16ms to run to end all of the logic to refresh the screen, the screen can reach 60 frames per second.
Such as:
Users can easily detect the lag caused by the frame, such as dragging the list of the lag, input method. There may be many reasons for the lag, such as:
- Redrawing of the larger part of the view structure takes too much time (CPU cycles, CPU cycles).
- Too many components are covered with each other, wasting too much time in the invisible range of the user.
- Excessive animation, resulting in excessive use of CPU and GPU components.
Check and fix these performance issues related to how the app is built. However, there are some general-purpose assistive tools to locate these performance issues:
Hierarchy Viewer: Detects if activity is too complex.
On-device tools:profile GPU Rendering, Show GPU Overdraw, GPU View update, and more.
Traceview: Bugs hidden in CPU code
Android Performance Patterns s01e02-rendering performance