简体   繁体   English

Chrome DevTools框架事件计时

[英]Chrome DevTools frame event timing

I'm using Chrome to isolate the bottle neck in the animations of an app. 我正在使用Chrome来隔离应用动画中的瓶颈。

It shows that frames are taking about 20+ms which is too slow. 它显示帧大约需要20 + ms,这太慢了。 But when I expaned the frame to see what's going in, it shows me a jQuery call taking 20+ms, but the actual Recalculate Style event takes little more than 5ms. 但是当我对框架进行详细说明以查看发生了什么时,它会向我显示一个jQuery调用需要20 + ms,但实际的Recalculate Style事件只需要5ms。

How can I find out what is causing that delay? 我怎样才能找出导致这种延迟的原因? I can't see what the other 15ms are 我看不出其他15ms是什么

The total event time: 总活动时间:

Chrome DevTools显示jQuery函数调用的总时间

The "Recalculate Style" event within the jQuery function jQuery函数中的“Recalculate Style”事件

Chrome DevTools显示重新计算样式事件的时间分割

Stack before "Recalculate Style" 在“重新计算风格”之前叠加

Chrome DevTools显示重新计算样式事件的堆栈

The other nested events which make up that total 22.93ms should be listed just after the Recalculate Style event. 在Recalculate Style事件之后,应该列出构成总共22.93ms的其他嵌套事件。 For example, below you can see that there is a Function Call which takes a total of 9ms. 例如,在下面您可以看到有一个函数调用总共需要9毫秒。 The purple number shows rendering time and the yellow number shows scripting time. 紫色数字表示渲染时间,黄色数字表示脚本编写时间。

家长活动

If you dismiss the popup, you can see that every event which makes up that call is detailed below it. 如果您关闭弹出窗口,您可以看到构成该呼叫的每个事件都在其下方详细说明。

嵌套事件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM