Live data from Hacker News

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

endtimes.dev

71–80 of 324 posts

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

#71
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…

So, anyone serious about sustainable future should stop using Python and stop recommending it as introduction to programming language? I remember one test that showed Python using 75x more energy than C to perform the same task.

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

#72
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…

Yeah, the environmental impact of jackasses mining jackass coin, or jackasses training LLMs is not insignificant. Are you seriously telling me now that if my website is 256k or 1024k I'm responsible for destroying the planet? Take it out on your masters.

And no, reducing resource use to the minimum in the name of sustainability does not scale down the same way it scales up. You're just pushing the idea that all human activity is some sort of disease that's best disposed of. That's essentially just wishing the worst on your own species for being successful.

It's never clear to me whether people who push this line are doing so because they're bitter and want to punish other humans, or because they hate themselves. Either way, it evinces a system of thought that has already relegated humankind to the dustbin of history. If, in the long run, that's what happens, you're right and everyone else is wrong. Congratulations. It will make little difference in that case to you if the rest of us move on for a few hundred years to colonize the planets and revive the biosphere. Comfort yourself with the knowledge that this will all end in 10 or 20 thousand years, and the world will go back to being a hot hive of insects and reptiles. But what glory we wrought in our time.

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

#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, KaTeX adds a whopping 347.5 kB!

  katex.min.css              23.6 kB
  katex.min.js              277.0 kB
  auto-render.min.js          3.7 kB
  KaTeX_Main-Regular.woff2   26.5 kB
  KaTeX_Main-Italic.woff2    16.7 kB
  ----------------------------------
  Total Additional          347.5 kB
Perhaps I should consider KaTeX server-side rendering someday! This has been a little passion project of mine since my university dorm room days. All of the HTML content, the common HTML template (for a consistent layout across pages), and the CSS are entirely handwritten. Also, I tend to be conservative about what I include on each page, which helps keep them small.

[1] https://susam.net/

[2] https://github.com/susam/susam.net/blob/main/site.lisp

[3] https://susam.net/tag/mathematics.html

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

#75

Earlier quoted context omitted.

The vast majority of internet bandwidth is people streaming video. Shaving a few megs from a webpage load would be the tiniest drop in the bucket. I am all for efficiency, but optimizing everywhere is a recipe for using up the resources to actually optimize where it matters.

> but optimizing everywhere is a recipe for using up the resources to actually optimize where it matters. Is it? My front end engineer spending 90 minutes cutting dependencies out of the site isn’t going to deny YouTube the opportunity to improve their streaming algorithms.

That's exactly it, but I fully expected whataboutism under my comment. If I had mentioned video streaming as a disclaimer, I'd probably have gotten crypto or Shein as counter "arguments".

Everyone needs to be aware that we are part of an environment that has limited resources beyond "money" and act accordingly, whatever the scale.

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

#76
post #58

Earlier quoted context omitted.

The vast majority of internet bandwidth is people streaming video. Shaving a few megs from a webpage load would be the tiniest drop in the bucket. I am all for efficiency, but optimizing everywhere is a recipe for using up the resources to actually optimize where it matters.

> The vast majority of internet bandwidth is people streaming video. Shaving a few megs from a webpage load would be the tiniest drop in the bucket. Is it really? I was surprised to see that surfing newspaper websites or Facebook produces more traffic per time than Netflix or Youtube. Of course there's a lot of embedded video in ads and it could maybe count as streaming video.

Cate to share that article, I find that hard to believe.

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

#77

Earlier quoted context omitted.

Do we? Let's compare some numbers. Creating an average hamburger requires an input of 2-6 kWh of energy, from start to finish. At 15¢ USD/kWh, this gives us an upper limit of about 90¢ of electricity. The average 14 kB web page takes about 0.000002 kWh to serve. You would need to serve that web page about 1-300,000 times to create the same energy demands of a single hamburger. A 14 mB web page, which would be a prett…

Now open an average news site, with 100s of request, tens of ads, autoplaying video ads, tracking pixels, etc., using gigabytes of ram and a lot of cpu. Then multiply that by the number of daily visitors. Without "hamburgers" (food in general), we die, reducing the size of usesless content on websites doesn't really hurt anyone.

Now go to an average McDonalds, with hundreds of orders, automatically added value meals, customer rewards, etc. consuming thousands of cows and a lot of pastureland.

Then multiply that by the number of daily customers.

Without web pages (information in general), we return to the Dark Ages. Reducing the number of hamburgers people eat doesn't really hurt anyone.

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

#78
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…

Do we? Let's compare some numbers. Creating an average hamburger requires an input of 2-6 kWh of energy, from start to finish. At 15¢ USD/kWh, this gives us an upper limit of about 90¢ of electricity. The average 14 kB web page takes about 0.000002 kWh to serve. You would need to serve that web page about 1-300,000 times to create the same energy demands of a single hamburger. A 14 mB web page, which would be a prett…

Just wondering how do you reached at the energy calculation for serving that 14k page?

For a user's access to a random web page anywhere, assuming it's not on a CDN near the user, you're looking at at ~10 routers/networks on the way involved in the connection. Did you take that into account?

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

#79
post #34

Earlier quoted context omitted.

Right. That’s why all the software from, say, Microsoft works flawlessly and at peak efficiency.

That’s not what I said. Only that the responsible engineers know which tradeoffs they make, and are competent enough to do so.

The decision to use react for the start menu wasnt out of competency. The guy said on twitter that thats what he knew so he used it [1]. Didnt think twice. Head empty no thoughts

1 https://x.com/philtrem22/status/1927161666732523596

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

#80
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…

So, anyone serious about sustainable future should stop using Python and stop recommending it as introduction to programming language? I remember one test that showed Python using 75x more energy than C to perform the same task.

I'm just investigating why the nightly backup of the work server is taking so long. Turns out python (as conda, anaconda, miniconda, etc) have dumped 22 million files across the home directories, and this takes a while to just list, let alone work out which files have changed and need archiving. Most of these are duplicates of each other, and files that should really belong to the OS, like bin/curl.

I myself have installed one single package, and it installed 196,171 files in my home directory.

If that isn't gratuitous bloat, then I don't know what is.

Post reply on HN