MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - Bundling == Slower load times?

WebPagetest Forums

Full Version: Bundling == Slower load times?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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.
Reference URL's