FireBug瀑布图中的差距 [英] Gaps in FireBug waterfall chart

查看:64
本文介绍了FireBug瀑布图中的差距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在测试我的Web应用程序中各种网页的性能时,我注意到Firebug的net选项卡(瀑布图)中存在一些间隙.在某些情况下,这些时间可能会占用整个请求的一半时间.

When testing performance of various web pages on my web application I noticed that there are some gaps in net tab (waterfall chart) in firebug. In some cases these may take up half of the time for the whole request.

通常是什么原因导致这些差距?如何消除这些差距?

What usually causes these gaps and how can they be removed?

推荐答案

发生这种情况的主要原因是脚本和CSS文件加载的文件.

The main reason this happens is for files that are loaded by scripts and CSS files.

  • 例如:CSS,直到链接到它们的CSS文件加载一小段延迟后,背景图像才会开始加载.

  • For example: CSS, background images won't start loading until a small delay after the CSS file that links to them loads.

许多JS库还加载图像,CSS和/或其他文件.这些加载要等到调用JS加载后再开始,再加上小的处理延迟.

Many JS libraries also load images, CSS, and/or other files. These loads won't start until the calling JS is loaded, plus a small processing delay.

库或嵌入式JS也可能在DOMContentLoaded事件(紫色线)或load事件(红线)处触发负载.

Libraries, or inline JS, may also fire off loads at the DOMContentLoaded event (the purple line) or the load event (red line).

最后,显然,JS可以执行在任何形式的延迟/间隔后均会触发的AJAX.

Finally, obviously, JS can execute AJAX that fires after any manner of delays/intervals.

这篇关于FireBug瀑布图中的差距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆