News for hackers. Stuff that matters.
Re:Forgo JavaScript packaging? Not so fast by altano on Tuesday November 24, 2015 @01:18PM (#10622444)
Without using server push or server hinting, why would you even expected http2 to be faster? But as you point out, the article doesn't mention using either of these and the HAR seems to back that up. Weird!
Re:Forgo JavaScript packaging? Not so fast by JoshTriplett on Tuesday November 24, 2015 @01:38PM (#10622560)
> Without using server push or server hinting, why would you even expected http2 to be faster?

Because http/2 can fetch more resources in parallel, and avoid blocking one fetch behind another. http/1.1 can only open a few connections to the server at once, and due to widespread bugs, each of those connections can't pipeline by sending multiple requests and waiting for multiple responses. So you can't eliminate all the round-trip latencies. With http/2, you can send all the requests and then wait for all the responses. So even without server push or server hinting, you could request the HTML, get it back, then request all the CSS and JS files in parallel, and get them all back.

Re:Forgo JavaScript packaging? Not so fast by altano on Wednesday November 25, 2015 @09:41AM (#10627378)
No I meant why would you expect it to be faster than bundling, not HTTP1.

When writing articles like this, there should really be more detail. We're all the scripts just script tags in the html? AMD dependencies discovered as the tree gets downloaded?

Unless you have an inefficient bundling scheme, bundling performs near optimally. It's biggest downside isn't perf but the annoyance related to having to build the bundles, scale issues on really large apps, debugging inconvenience, much worse caching characteristics, etc. HTTP2 can beat bundling perf but you're going to have to make use of http server push to do it.