Live data from Hacker News

A 14kb page can load much faster than a 15kb page

endtimes.dev

171–180 of 356 posts

Re: A 14kb page can load much faster than a 15kb page

#171

I like the idea mentioned in the article of increasing the number of packets sent in the slow start - as far as I know you could just crank that from the server side TCP stack to something much larger, right?

This was my very first thought - TCP/IP behaviour isn’t carved in stone, just make your server send more data at the start!

Re: A 14kb page can load much faster than a 15kb page

#172

content-length: 31367 for this page, so looks like the author couldn't do it either. How can us mere mortals ? A more realistic target: https://512kb.club/

They mention in the article that the 14 kb performance cliff applies to compressed size - I believe 32kb is the uncompressed size here

Re: A 14kb page can load much faster than a 15kb page

#173

Earlier quoted context omitted.

This is simply false, even if you mean using AVIF. Here's a test case, using a moderate sized (3000x2000) image. Nothing ridiculously huge or anything, and it's not an especially complex image. I'm linking the best I can do for both JPEG (at 200 KB) and AVIF (at 100 KB). If you can create a passable versions of these images at 100 KB with either codec (or WEBP for that matter), please do show us how. Original image:…

I normally deal with 720P images for internet distribution. For 3000x2000 that would be around 230KB to 250KB.

You replied to a thread about a photography website. I don't think 720p images are the norm for that use case.

In any event, I don't think the AVIF result at 250 KB is acceptable for photography either: https://0x0.st/o93a.avif - There's a ton of smearing and blurring that's very obvious when you're viewing the image at full size.

Re: A 14kb page can load much faster than a 15kb page

#174

Earlier quoted context omitted.

https://www.emergeinteractive.com/insights/detail/does-irres... In the US as of 2020, it was 3KG CO2 per GB Data.

I don't agree with the reasoning presented. It takes the estimate for the amount of energy that it takes to run the internet infrastructure and clients (141GW * 8765h in a year = 1235865 GWh), divides it by the amount of data transferred yearly (241 billion GB) and gets to 5.12kWh/GB. You might argue that if people download more data, more equipment needs to run to enable it, but really all this energy consumption is…

The website usage on the client side is more to do with resource usage. Unnecessary usage of Javascript is often what makes websites laggy.

You computer will normally down-clock (you can turn this off in the bios) when under lighter loads.The difference between a JS-free webpage and a bloated web page that uses multiple JavaScript with extra Javascript for ads and tracking could be around 10W/H to 40W/H on Desktops.

Re: A 14kb page can load much faster than a 15kb page

#175

Earlier quoted context omitted.

This is simply false, even if you mean using AVIF. Here's a test case, using a moderate sized (3000x2000) image. Nothing ridiculously huge or anything, and it's not an especially complex image. I'm linking the best I can do for both JPEG (at 200 KB) and AVIF (at 100 KB). If you can create a passable versions of these images at 100 KB with either codec (or WEBP for that matter), please do show us how. Original image:…

I normally deal with 720P images for internet distribution. For 3000x2000 that would be around 230KB to 250KB.

3000x2000 basically means "fullscreen on a retina display @ full resolution". You can only reasonably show one picture like that at a time. So it's completely OK to have the currently displayed picture at that resolution/size.

But all photo should be loaded at a much lower size, initially, and only downloaded at full size the the user puts them in full screen.

Re: A 14kb page can load much faster than a 15kb page

#176
post #166

Earlier quoted context omitted.

Downsize the 3000x2000 to the dimensions it will be displayed at and you will be able to go below 100KB.

What if it will be displayed at 3000x2000? I mean that's the whole conversation here, we're talking about images that are the focus point of the page.

Yes, then 100KB is usually not enough.

Re: A 14kb page can load much faster than a 15kb page

#177

Earlier quoted context omitted.

I don't think a site where the key content is large (relative to text) can be expected to deliver that content super fast. However, quickly loading the bulk of the website and perhaps having a placeholder for the image that has yet to load will still make the site better. I remember seeing something that allowed you to create really blurry placeholders that are tiny, but I can't find it now.

Maybe it was [blurhash]( https://blurha.sh/ )?

Inlining the blurhash script so that the blurred image is in the first paint will eat up about 2kb, but then you're good to go. I did it for this little demo: https://codesandbox.io/s/inline-blurhash-y4b0wj?file=/pages/...

Re: A 14kb page can load much faster than a 15kb page

#178
post #81

Earlier quoted context omitted.

Wat. 1MB per photo is tiny when the photo is the content. You need ~100KB for a high quality 512x512 WebP. AVIF will be slightly better but still doesn’t have universal support. We’ve had 4K (8MP) screens for a decade now and normal DSLRs shoot 25MP so you can zoom in.

Bandwidth is extremely carbon intensive. Someone viewing a couple of few 25MP images online could use 20g to 100g of CO2 (depending on compression).

We create 40kg of CO2 a day each through our diet, transport, consumption and other energy use. The idea we need to target our energy burden on Internet routers is absurd.

Re: A 14kb page can load much faster than a 15kb page

#179

That's only doable with a text-centric website. I'm currently finishing a photography section for my personal website, and the gallery pages are several hundred kBs in size, while single photo page is almost 1MB in size (provided you load it on a 28" screen; browser will load smaller variants on smaller screens). Most of that weight is the thumbnails (and almost-full-size photo in the latter case). The only JS I have…

1MB per photo is fine. It's the content after all. Many sites today will load 10MB of JS and custom font crap alone, just to show a few paragraphs of text. I don't think the point is the size itself, but it's the content vs. bloat ratio.

What's the substitute to not using custom fonts? Or is there a better way to load it? I'm having a hard-time convincing our brand team to defaulting to a system font.

Re: A 14kb page can load much faster than a 15kb page

#180

Earlier quoted context omitted.

I don't agree with the reasoning presented. It takes the estimate for the amount of energy that it takes to run the internet infrastructure and clients (141GW * 8765h in a year = 1235865 GWh), divides it by the amount of data transferred yearly (241 billion GB) and gets to 5.12kWh/GB. You might argue that if people download more data, more equipment needs to run to enable it, but really all this energy consumption is…

The website usage on the client side is more to do with resource usage. Unnecessary usage of Javascript is often what makes websites laggy. You computer will normally down-clock (you can turn this off in the bios) when under lighter loads.The difference between a JS-free webpage and a bloated web page that uses multiple JavaScript with extra Javascript for ads and tracking could be around 10W/H to 40W/H on Desktops.

I agree with this. I was disagreeing with the statement

> Bandwidth is extremely carbon intensive.

and the reasoning that supports that statement.

Post reply on HN