Live data from Hacker News

A 14kb page can load much faster than a 15kb page (2022)

endtimes.dev

261–270 of 324 posts

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

#261
post #18

Earlier quoted context omitted.

It's not low-hanging fruit, though. While you try to optimise to save a couple of mWh in power use, a single search engine query uses 100x more and an LLM chat is another 100x of that. In other words: there's bigger fish to fry. Plus caching, lazy loading etc. mitigates most of this anyway.

Engineering-wise, it sometimes isn't. But it does send a signal that can also become a trend in society to be more respectful of our energy usage. Sometimes, it does make sense to focus on the most visible aspect of energy usage, rather than the most intensive. Just by making your website smaller and being vocal about it, you could reach 100,000 people if you get a lot of visitors, whereas Google isn't going to give…

Realistically “my website fits in 14kb” is a terrible signal because it is invisible to 99.99% of the population. How many HNers inspect the network usage when loading a random stranger’s website?

Plus, trying to signal your way to societal change can have unintended downsides. It makes you feel you are doing something when you are actually not making any real impact. It attracts the kind of people who care more about signaling the right signals than doing the right thing into your camp.

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

#262
post #164

Earlier quoted context omitted.

Depending on who's visiting your site and how often, the rest probably isn't in cache though. If your site is a product landing page or a small blog or something else that people are rarely going to repeatedly visit, then it's probably best to assume that all your assets will need to be downloaded most of the time.

While it'd be fun to try, I doubt you can produce any page at all that's total 14kb with assets, even back at the dawn of the web in the 90s, aside from the spartan minimal academic pages some have. And where loading faster is completely irrelevant.

The homepage for my blog is apparently 9.95kB, which includes all styles, some JS, and the content. There is an additional 22kB font file that breaks the rule, but when I first designed the site I used built-in browser fonts only, and it looked fine. There are no images on the homepage apart from a couple of inlined SVG icons in the footer.

Looking at the posts themselves, they vary in size but the content/styles/JS probably average around 14kB. You've also got the font file, but again a more minimal site could strip that. Finally, each post has a cover image that makes up the bulk of the content size. I don't think you're ever going to get that under 14kB, but they're also very easy to load asynchronously, and with a CSS-rendered blur hash placeholder, you could have an initial page load that looks fairly good where everything not in the initial 14kB can be loaded later without causing FOUCs/page layout shifts/etc.

For a magazine site or a marketing site, the 14kB thing is almost certainly impossible, but for blogs or simple marketing pages where the content is more text-based or where there are minimal above-the-fold images, 14kB is pretty viable.

For reference, my blog is https://jonathan-frere.com/, and you can see a version of it from before I added the custom fonts here: https://34db2c38.blog-8a1.pages.dev/ I think both of these versions are not "spartan minimal academic pages".

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

#263
post #74

I just checked my home page [1] and it has a compressed transfer size of 7.0 kB. / 2.7 kB main.css 2.5 kB favicon.png 1.8 kB ------------------- Total 7.0 kB Not bad, I think! I generate the blog listing on the home page (as well as the rest of my website) with my own static site generator, written in Common Lisp [2]. On a limited number of mathematical posts [3], I use KaTeX with client-side rendering. On such pages…

I never understood math / latex display via client side js. Why can't this be precomputed into html and css?

[deleted]

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

#264
post #217

Earlier quoted context omitted.

I can't say I've ever cared about live forking a container (or VM, for that matter)

Your cloud provider may be doing it for you. Ops informed me one day that AWS was pushing out a critical security update to their host OS. So of course I asked if that meant I needed to redeploy our cluster, and they responded no, and in fact they had already pushed it. Our cluster keeps stats on when processes start. So we can alert on crashes, and because new processes (cold JIT) can skew the response numbers, and…

None of this is making live forking a container desirable to me, I'm not a cloud hosting company (and if I was, I'd be happy to provide a VPS as a VM rather than a container)

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

#265
post #264

Earlier quoted context omitted.

Your cloud provider may be doing it for you. Ops informed me one day that AWS was pushing out a critical security update to their host OS. So of course I asked if that meant I needed to redeploy our cluster, and they responded no, and in fact they had already pushed it. Our cluster keeps stats on when processes start. So we can alert on crashes, and because new processes (cold JIT) can skew the response numbers, and…

None of this is making live forking a container desirable to me, I'm not a cloud hosting company (and if I was, I'd be happy to provide a VPS as a VM rather than a container)

There’s using a feature, having a vendor use it for you, or denying its worth.

Anything else is dissonant.

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

#266
post #10

Aside from latency, reducing ressources consumption to the minimum required should always be a concern if we intend to have a sustainable future. The environmental impact of our network is not negligible. Given the snarky comments here, we clearly have a long way to go. EDIT: some reply missed my point, I am not claiming this particular optimization is the holy grail, only that I'd have liked for added benefit of red…

Absolutely agree with that. I recently visited the BBC website the other day and it loaded about 120MB of stuff into the cache - for a small text article. Not only does it use a lot of extra energy to transmit so much data, but it promotes a general atmosphere of wastefulness. I've tried to really cut down my website as well to make it fairly minimal. And when I upload stuff to YouTube, I never use 4K, only 1080P. I…

Let's take it further: That atmosphere of wastefulness not only concerns bandwidth and energy use but also architectural decisions. There's technology that punches far above its weight class in terms of efficiency and there's the opposite. It seems like a collective form of learned helplessness, on both sides, the vendors and users. IMHO, the only real reason for slow, JavaScript-heavy sites is surveillance and detailed, distributed profiling of users. The other would be animated UI giving dopamine hits, but that could totally be confined to entertainment and shouldn't be a cue for "quality" software.

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

#267

Earlier quoted context omitted.

Containers were invented because VMs were too slow to cold start and used too much memory. Their whole raison d'être is performance.

Can you live fork containers like you can VMs? VM clone time is surprisingly quick once you stop copying memory, after that it's mostly ejecting the NIC and bringing up the new one.

Why would you, if you can simply start replacement containers in another location and reroute traffic there, then dispose of the old ones?

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

#268

Earlier quoted context omitted.

A question as a non user: What are you doing with the extra 500kB for me, the user? > 90% of the time in interested in text. Most of the reminder vector graphics would suffice. 14 kB is a lot of text and graphics for a page. What is the other 500 for?

I use it for fonts. My website [0] consists of about 15kB of compressed HTML + CSS and 200kB of fonts. [0] https://wyczawski.dev/

Why do I care about fonts? Honestly, if my browser had an option not to load fonts and use my default to save load time I ld choose that 19 out 20 times.

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

#269
post #264

Earlier quoted context omitted.

None of this is making live forking a container desirable to me, I'm not a cloud hosting company (and if I was, I'd be happy to provide a VPS as a VM rather than a container)

There’s using a feature, having a vendor use it for you, or denying its worth. Anything else is dissonant.

For the VM case, I'm sure I might have benefited from it, if Digital Ocean have been able to patch something live without restarting my VPS. Great. Nothing I need to care about, so I have never cared about live forking a VM. It hasn't come up in my use of VMs.

It's not a feature I miss in containers, is what I'm saying.

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

#270

Earlier quoted context omitted.

A question as a non user: What are you doing with the extra 500kB for me, the user? > 90% of the time in interested in text. Most of the reminder vector graphics would suffice. 14 kB is a lot of text and graphics for a page. What is the other 500 for?

Text, yes. Graphics? SVGs are not as small as people think especially if they're any more complex than basic shapes, and there are plenty of things that simply cannot be represented as vector graphics anyway. It's fair to prefer text-only pages, but the "and graphics" is quite unrealistic in my opinion.

By vector graphics I meant primitive graphics.

Outside of youtube and... twitter? I really don't need fancy stuff. HN is literally the web ideal for me, and Id think most users if given an option.

Post reply on HN