Firebug Net 面板 - “请求自开始以来的开始时间”

发布于 2024-12-10 06:55:16 字数 949 浏览 0 评论 0原文

我正在分析目前在本地主机上运行的 Web 应用程序的性能。为此,我使用 Firebugs Net Panel。我已经看到 Jan 对网络面板时间线的精彩解释 - http:// /www.softwareishard.com/blog/firebug/firebug-net-panel-timings/ 。我还考虑了 YSlow 建议,以使组件在页面中加载得更快并且文件大小更小。但这仍然需要相当多的时间。

在上图中,工具提示显示第二个请求已启动 171-15=156第一次请求后的毫秒数。

+171ms 请求开始时间

为什么这么晚才发送请求?是不是浏览器设置有问题?据我所知,Firefox 可以同时处理 6 个请求 - 为什么它不处理第 5 个和第 6 个请求以及第 2 个、第 3 个、第 4 个请求?我可以做些什么来改进这一点,以便更早地处理请求吗?

感谢

规格:

Firefox:6.0.2
萤火虫:1.8.3
服务器:本地主机

第一个请求:HTML 文件
第二个请求:CSS 文件
第三个请求:JS 文件
第四个请求:JS文件
第 5 个请求:GIF 文件
第 6 个请求:PNG 文件
第 7 个请求:PNG 文件
第8个请求:JS文件
第 9 个请求:PNG 文件
第 10 个请求:JSON 文件
第 11 个请求:PNG 文件

I'm working on analyzing the performance of a web application which runs for now on localhost. For that purpose, I'm using Firebugs Net Panel. I've seen Jan's nice explanation of the Net Panel timeline - http://www.softwareishard.com/blog/firebug/firebug-net-panel-timings/ . I've also considered the YSlow recommendations to have the components load in the page much quicker and with a smaller file size. But it still requires quite a lot of time.

In the above image the tool tip displays that the second request was started 171-15=156 ms after the first request.

+171ms Request start time since the beginning

Why does it send the request that late? Is something wrong with the browser settings? As far as i know, Firefox can process 6 simultaneous requests - why doesn't it do the 5th and 6th request along the 2nd,3rd,4th request? Can i do something to improve this so that the request gets processed earlier?

Thankx

Specs:

Firefox: 6.0.2
Firebug: 1.8.3
server:localhost

1st request: HTML file
2nd request: CSS file
3rd request: JS file
4th request: JS file
5th request: GIF file
6th request: PNG file
7th request: PNG file
8th request: JS file
9th request: PNG file
10th request: JSON file
11th request: PNG file

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

前事休说 2024-12-17 06:55:16

请求 3 和 4 是 JavaScript,默认情况下,JavaScript 在下载、解析和执行时会阻塞 UI 线程。

阅读 @souders 的这篇文章,其中更深入地解释了(http://www.stevesouders.com/blog/2010/12/06/evolution-of-script-loading/)

您可以尝试添加异步或将属性推迟到脚本标记,但它们仅在某些浏览器中有效。另一种选择是将 js 移至页面底部或像 Google Analytics 那样异步加载。

Requests 3 and 4 are javascript and by default javascript blocks the UI thread as it's downloaded, parsed and executed.

Have a read of this article by @souders which explains in a bit more depth (http://www.stevesouders.com/blog/2010/12/06/evolution-of-script-loading/)

You could try adding the async or defer attributes to the script tags but they'll only work in some browsers. Another option is to move the js to the foot of the page or load it asynchronously as Google Analytics does.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文