android app fluency of analysis

Most people feel Caton and other major root cause of performance problems because rendering performance. From the designer's point of view, they want to have more App animations, pictures and other fashion elements to achieve a smooth user experience. However, the Android system will most likely not be completed in time the complex interface rendering operations. A ndroid system every 16ms releasing the VSYNC signal to trigger the UI rendering, render successfully if every time, so it can reach 60fps smooth images needed, in order to achieve 60fps, which means that most of the operations of the program must be completed within 16ms, 16ms time exceeds the more, the more lost frames ( may be roughly estimated 5 seconds did not respond during a number of frames lost thrown exception anr, 5000/16 = 312)

 

1 fluency understand concepts

Vs frame rate refresh rate

Refresh Rate: number of screen updates per second, mobile phone screen refresh rate is 60HZ
Frame Rate: number of frames (1000ms / frame = frame rate) of the GPU to draw in a second

Dropped frames

Android system every 16ms releasing the VSYNC signal to trigger the GPU UI rendering, if you spend a certain operating time is 24ms, get VSYNC signal system in due time is not yet ready, will not be able to update any of the content, then the user within 32ms will see the same picture frame (Caton phenomenon), which dropped frames.

 

1. High animated fluency requirements page

 

  • First open the built-in GPU graphics renderer (per frame is more than 16ms. That reaches 60, lower than the 30 required to submit reports)

  • Android studio monitor to see indicators (alternative)

  • adb shell dumpsys gfxinfo PackageName (export each thread of the recent 120 gpu rendering information)

  • Trepn Profiler to see the indicators (see all recent information, the most complete, and export excel)

2. Ordinary Animation

  • Open native GPU graphics renderer (16ms per frame exceeds the line. That has reached 60, lower than the 15 required to submit reports
The App now draw up to 60 frames per second, 1000ms / 60 frames = 16.67ms / frame, that is to say the requirements are rendered images per frame rendering time is 16.67ms, more than this time may cause not smooth The phenomenon.

Guess you like

Origin www.cnblogs.com/chen-xia/p/11230921.html