2 ms·
You seem to be still holding a lot of assumptions from 2010. In practice compression is not a big issue if you use something with a pre-defined dictionary spec
by ratww 6y ago
You seem to be still holding a lot of assumptions from 2010.
In practice compression is not a big issue if you use something with a pre-defined dictionary specialized for HTML/CSS/JS, which is Brotli. The advantages of bundling are not exactly too large. Sure you might not be deduplicating some identifiers, but the lion's share of code in practice is normal javascript/CSS/html.
Also, in the long term, caching and the removal of code added by bundling more than makes up for any losses from compression.
Also, with Multiplexing there's no problem with download multiple files sequentially, because you don't need TCP handshakes and HTTPS negotiation, which were the reason for bundling in 2010. In fact, multiplexing multiple files might be faster in some cases, because you're able to parallelise the downloads and the parsing, rather than having to download a big bundle before parsing it.
There are of course caveats to this, but neither bundling or separate assets are silver bullets.