Generic Bundling

Ilya Grigorik igrigorik at
Fri Oct 25 20:48:40 PDT 2013

On Fri, Oct 25, 2013 at 6:24 AM, Jonathan Bond-Caron <
jbondc at> wrote:

> On Wed Oct 23 10:17 PM, Ilya Grigorik wrote:
> > In short, pitching "zip bundling" as a performance optimization is a
> > complete misnomer. If anything, it will only make things worse, even
> > for HTTP 1.x clients.
> I disagree, if you want to treat this as an "optimization problem", let's
> look at it:
> 1. x number of resources/files
> 2. x number of network connections
> What is the optimal way of loading the resources/files?
> I don't have a proof but I'm pretty sure that's NP-complete.

I assure you it is not NP-complete. We know what the critical resources are
for the page (i.e. their priorities), and we know the properties of TCP
connections (like slow-start). The optimal number of connection is 1 (with
exception of few edge cases where TCP window scaling is disabled and BDP is

> Are you saying that HTTP 2.0 loading is the best known algorithm in all
> cases?
> That's bogus. It's certainly a better algorithm but there's a wide range
> of strategies that will result in faster load times (it involves bundling
> in some cases).

Bundling does not achieve anything that a good multiplexing solution can't
-- bundling is multiplexing at the application layer. HTTP 2.0 provides the
necessary tools to achieve same performance as bundling, but with
additional benefits of granular downloads, incremental execution, etc. (I
feel like I'm stuck in a loop ;-))

> The way I look at it, this isn't about zipping a whole application vs.
> HTTP 2.0, it's actually a combination of both strategies that will yield
> better load times.

No. You don't need bundling with HTTP 2.0.

> I agree that "large bundles break prioritization", but why wouldn't you
> for example zip 20 image files that never change during the year and choose
> that method of delivery?

Because you can load 20 images individually, which means you can display
each of them sooner, and you have a more granular cache - if you're under
pressure, you can evict one or more images without evicting all of them.
Similarly, you don't need to read the entire zip to get just one image, etc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list