Current time: 08-07-2020, 06:25 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bundling == Slower load times?
07-04-2012, 02:05 AM
Post: #1
Bundling == Slower load times?
Hi I'm looking at adding a script/css bundling feature to my application.

However, I measured the before and after and found my load times were slower with the bundling enabled.

So I ended up creating a stripped down app to reproduce the problem.

IE8 with bundling:
http://www.webpagetest.org/result/120703...bdb582b8c/

IE8 without bundling:
http://www.webpagetest.org/result/120703...053a55634/

IE7 with bundling:
http://www.webpagetest.org/result/120703...5c072698a/

IE7 without bundling:
http://www.webpagetest.org/result/120703...a5dd39189/

The only browser where bundling seems faster is with IE7. I imagine this is because of it's 2 connection limit per domain and blocking script downloads.

Am I missing something here? I've always read bundling scripts and css were a best practice. Is that not the case with newer browsers?
Find all posts by this user
Quote this message in a reply
07-10-2012, 02:42 AM
Post: #2
RE: Bundling == Slower load times?
Bundling is no longer the clear win that it used to be (at least when you are talking about a sane number of scripts). Each new connection needs to ramp up the connection through TCP's slow start. With 6 connections running in parallel the browser gets 3x as much data in each round trip as when you only have 2.

You are still better off getting as much script content out of the top of the document as possible but it's not strongly recommended that you collapse everything into a single script (particularly if that means moving things up the page to do it).

There are always exceptions so looking at the full waterfall and how the page renders is generally the best way to do it.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)