且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Chrome开发工具:时间轴 - 白色条

更新时间:2023-09-30 10:40:16


空闲清除条总是会填充呈现之间的时间吗? / p>

没有。这个空闲时间基本上是GPU绑定的。这是浏览器在GPU上等待并返回的地方。在这里波动是完全正常的,只要你大概60FPS,这是很好的。


是否有粗略的关系在计算机上的时间轴配置文件和cpu利用率之间是否收集配置文件?

不是我所知道的。这里空闲是浏览器等待系统的其他部分(主要是CPU或GPU)完成其工作的时间。它与它使用的资源数量无关。


是否有任何方法可以表征未经测试的灰色条纹?

p>

绝对不是,这就是为什么它被称为Uninstrumented的原因。这意味着DevTools不知道发生了什么。像垃圾收集这样的事情会在时间轴上得到标记,因为它知道那个任务是什么。该团队正在努力缩小这种类型的材料。这是一个缓慢的过程,需要全面跟踪并找出如何将其展示给DevTools,所以我们将有相当长的一段时间没有时间。


I'm trying to understand a few things about the timeline in the Chrome Dev Tools. From the documentation, I gather that the grey and clear bars are "Activity that was not instrumented by DevTools" and "Idle time between display refresh cycles", respectively.

I have an app that renders updates each frame (requestAnimationFrame()) and has a typical timeline profile pictured below:

Unfortunately, to me the documentation does not make it clear how to evaluate the grey and white space in my application. My questions are:

Will the "idle" clear bars always fill the time between renders?

In other words, is the profile I'm seeing expected, in regard to the white bars? I'm tempted to assume so, but the example screenshot in the documentation looks like:

There are clearly frames where the white space does not fill the space between renders.

Is there a rough relationship between the timeline profile and cpu utilization on the machine the profile is collected on?

In the profile below, about 40% of the time is idle, so could I expect that to correspond to using ~60% of a core for the operations represented in the profile?

Is there any way to characterize the "Uninstrumented" grey bars?

Or are there typical things which this could be (Garbage Collection, etc...)?

Hopefully that is not too much for one question. Thanks in advance

Will the "idle" clear bars always fill the time between renders?

No. This idle time is essentially GPU bound. It is where the browser is waiting on the GPU to do its thing and return. It is perfectly fine to have fluctuation here, so long as you're hitting roughly 60FPS, it's all good.

Is there a rough relationship between the timeline profile and cpu utilization on the machine the profile is collected on?

Not really as far as I am aware. Idle here is time where the browser is waiting for some other part of the system (CPU or GPU primarily) to do its job. It isn't related to how many resources it is using.

Is there any way to characterize the "Uninstrumented" grey bars?

Absolutely not, this is why it is called "Uninstrumented". It means the DevTools has no idea what is going on. Things like Garbage Collection do get marked on the timeline, since it knows what that task is. The team is working on narrowing down this type of material. It is a slow process to track it all down and figure out how to surface it to DevTools, so we will have uninstrumented time for quite a while.