2 ms·
Why is multiple files worse than one? PDF is an insanely complex format, I don't think the argument of "I can just read a PDF file" is strong.
by staticassertion 4y ago
Why is multiple files worse than one? PDF is an insanely complex format, I don't think the argument of "I can just read a PDF file" is strong.
- LtWorf 4y agoBecause multiple files require multiple roundtrip times, more connections, and the total amount of data is higher because of all the waste that happens with headers.
- bruce511 4y agoThe headers are not the wasteful part. Headers are typically in the low-hundreds of bytes. This extra data is insignificant as "waste" compared to the request/response content. The real waste is in the time it takes to create and destroy the connection. (hence why http/3 switched to UDP, and also why multiplexing is a thing.) Thing is, combining js and css on the server side into 1 file pretty much negates this speed benefit. I've been building sites this way forever, and performance is great. First page takes longer, but then those files are in the cache anyway. The actual problem is Ads. They require tracking, and of course displaying. If you're looking for waste, or indeed why a server would bother with http/3 then look no further. No ads, no problem. Unfortunately for those sites that rely on advertising for revenue, I don't have an alternative suggestion. I get it, ads pay for lots of the Internet I "browse". I'm not a fan of pay walls and subscriptions. So http/3 is a solution to an economic reality - and really only benefits the ad-supported Web - but for them it is important.
- LocalH 4y agoI/O. An anecdote. A friend of mine was modding a 360/PS3 game recently. He was trying to animate a texture by cycling through an image sequence. The first attempt read every image from disk each time, and ate shit. The second attempt pre-loaded them all, and it works perfectly fine