Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top