Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

默认判定卡顿的阀值为什么是500ms而不是16ms呢? #124

Open
GeminiWy opened this issue Dec 11, 2018 · 1 comment
Open

默认判定卡顿的阀值为什么是500ms而不是16ms呢? #124

GeminiWy opened this issue Dec 11, 2018 · 1 comment

Comments

@GeminiWy
Copy link

看了原理:在主线程处理消息的前后记录时间,算出差值,与阀值进行比较从而判断卡顿
疑问:主线程处理消息时间差值为什么能判断卡顿呢?如果我的理解没错的话,主线程16ms一次接收到垂直信号,然后进行下一帧画面的绘制。那么这个绘制的消息的处理时间不应该不超过16ms吗?(不影响到下一次接收信号)

@xs617
Copy link

xs617 commented Feb 21, 2019

16ms这个只是给measure,layout,draw的时间,实际上这个库计算的是message在messageQueue中取出来后执行的时间,因为android的ui线程也是走的这种事件驱动,所以就能用来判断ui线程上的阻塞事件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants