Hacker News new | ask | show | jobs
by bgirard 2370 days ago
The article overlooks the end-to-end overhead of HTTP/2 which unfortunately makes the trade-offs between batching API calls and bundling JavaScript very complex in practice. For instance in Chrome the overhead of an additional request is still several milliseconds of local CPU time. Which means in practice you'll trade off CPU time to benefit warm loads where the cache is populated.

I'm hopeful someday the overhead will be made negligible but until then I'd suggest profiling the trade-offs.

Meanwhile data frameworks like Relay offer incremental flushing with much more flexibility all over a single request.

1 comments

> For instance in Chrome the overhead of an additional request is still several milliseconds of local CPU time

this is pretty interesting, do you have links or knowledge of why this is the case? is it simply JIT overhead? What could be taking O(ms) of CPU time?