News for hackers. Stuff that matters.
Re:How can we, as web professionals, help to make the web mo... by ogou on Friday September 18, 2020 @02:57AM (#24513731)
I don't believe asset and component delivery are the energy hogs this article implies. Actual computation uses more energy. Youtube transcoding the 500 hours of video it gets every 60 seconds uses much more power than too many unoptimized PNGs do. We live in a time where people will run their car to charge their phone. It's not js packages. The inefficiencies are in the chair, the users chair.
Re:How can we, as web professionals, help to make the web mo... by cblconfederate on Friday September 18, 2020 @04:38AM (#24514393)
> Youtube transcoding the 500 hours of video it gets every 60 seconds uses much more power than too many unoptimized PNGs do

Youtube encodes the video only once, users decode them billions of times in their laptops/phones

Plus datacenters have an incentive to be energy efficient and are becoming more and more green.

Re:How can we, as web professionals, help to make the web mo... by madeofpalk on Friday September 18, 2020 @06:15AM (#24514956)
> Youtube encodes the video only once

My assumption always has been that Youtube is creating multiple renditions of videos at different resolutions and codecs.

Re:How can we, as web professionals, help to make the web mo... by pitay on Friday September 18, 2020 @07:04AM (#24515253)
Pretty sure the GP meant only once for the encoding of each resolution. He was just pointing out the asymmetry of the work, YT only encodes once per distinct resolution it shows, each of these encodings can be decoded by clients millions of times if the video is popular enough to bring in that many clients.
Re:How can we, as web professionals, help to make the web mo... by kortilla on Friday September 18, 2020 @05:44AM (#24514795)
Don’t forget most videos see very few to no views (private/unlisted and people are mostly boring)l
Re:How can we, as web professionals, help to make the web mo... by cblconfederate on Friday September 18, 2020 @05:47AM (#24514811)
That has a negligible impact on the ratio of <view time> / <encoding time>
Re:How can we, as web professionals, help to make the web mo... by throwaway_pdp09 on Friday September 18, 2020 @04:17AM (#24514234)
Voted straight to the top an opposing view that makes a single woolly and unjustified claim ("Youtube transcoding the 500 hours of video it gets every 60 seconds[0] uses much more power than too many unoptimized PNGs do" - but no figures to back either of those claims up). I see a lot of that on HN, strange thing.

I run without JS. If I need JS I start up a VM. It's quite common for eg. google groups to max out the CPU for 10 seconds or more before updating. This is where your problem is. A 100 million CPUs permanently at 100% is where your energy is going.

[0] I found this stat backed up here (https://www.brandwatch.com/blog/youtube-stats/) You should post this fact to stop other people wasting their time.

Re:How can we, as web professionals, help to make the web mo... by lifeisstillgood on Friday September 18, 2020 @04:24AM (#24514294)
From the above:

Over half of YouTube users use the site to work out how to do things they’ve not done before

This is one of the undersung advances of the web - it's become more than access to the worlds knowledge (like some uber library) but has become a new means of transmitting learning.

On the other side if one could workout a way to identify a product related to this "new thing to learn" the retargetting value would be huge

Re:How can we, as web professionals, help to make the web mo... by bill_mon on Friday September 18, 2020 @03:05AM (#24513788)
You're right, but that doesn't mean we shouldn't do anything. If we can flip a bit somewhere to save some minute amount of energy, we should do that. For example: optimize PNGs, it's easy and a one time procedure.

We can't change what's in the chair but we can change our product.

Re:How can we, as web professionals, help to make the web mo... by scrollaway on Friday September 18, 2020 @03:13AM (#24513845)
If the effect is minute enough, you might be using more net energy thinking about this, typing this comment, discussing it with others and optimizing your final png than actual energy saved for your users.

Feel-good savings are not helpful. You can do it but let's not pretend. Reminds me of an ex girlfriend that would account for coins she found on the ground in her monthly budget...

Re:How can we, as web professionals, help to make the web mo... by searchableguy on Friday September 18, 2020 @03:23AM (#24513909)
> Reminds me of an ex girlfriend that would account for coins she found on the ground in her monthly budget...

Where do you find enough coins on the ground for that? I haven't come across any in my entire life.

Re:How can we, as web professionals, help to make the web mo... by scrollaway on Friday September 18, 2020 @11:19AM (#24517891)
You don't, that was kinda my point :) she'd find maybe 1 eur a month if lucky.
Re:How can we, as web professionals, help to make the web mo... by XMPPwocky on Friday September 18, 2020 @03:40AM (#24514014)
Have you looked?
Re:How can we, as web professionals, help to make the web mo... by staticassertion on Friday September 18, 2020 @03:26AM (#24513929)
I assume they mean minute relative to cars or something, not minute in an absolute sense.

Just as a sort of thought about this, if the entire web moved to brotli over gzip, or if we introduced an even better compression algorithm that was widely distributed across the internet, what would that impact me? A 5% reduction in CPU usage for every computer loading every page? I'd be curious to hear what that would actually amount to, power-wise.

Re:How can we, as web professionals, help to make the web mo... by brain5ide on Friday September 18, 2020 @04:08AM (#24514182)
I might be cynical, but that change would work only with the assumption that what is done on the page remains constant. What I guess would happen is that it would do 5% more useless operations. The limiting factor here is user's tolerance for bullshit, not some predefined functionality.
Re:How can we, as web professionals, help to make the web mo... by robin_reala on Friday September 18, 2020 @05:07AM (#24514604)
It depends on scale. I’m working on a site with multiple billion visits a year, so optimising a global asset will absolutely have an effect.
Re:How can we, as web professionals, help to make the web mo... by bill_mon on Friday September 18, 2020 @03:28AM (#24513945)
I get your point and I agree to some extend -- a single png doesn't remove much carbon. But it's impossible to figure out where the break even point lies. It would be irresponsible to never optimize for size or cpu usage. Where would you draw the line?
Re:How can we, as web professionals, help to make the web mo... by kortilla on Friday September 18, 2020 @05:48AM (#24514817)
Do some napkin calculations so you get a ballpark of where the line is. That will help you discard entire categories of pointless optimizations (e.g. pictures going into a company-wide email for a 500 person company).
Re:How can we, as web professionals, help to make the web mo... by josteink on Friday September 18, 2020 @03:45AM (#24514042)
> For example: optimize PNGs, it's easy and a one time procedure.

And then that PNG is loaded by a webpage, which contains no HTML, but loads 28 megabytes of JS, which your browser has to parse, JIT and run, and then that triggers loading of web-fonts, and after that we create a virtual DOM, and then render that into a real DOM... (which is probably around 150kb)

And then after about 15 seconds of 100% CPU time, the browser finally has something to show... And then it loads that minified PNG.

You know what? That PNG isn't the issue. That PNG probably has a highly optimized decoder, written in native code, and the relative cost of a optimized/unoptimized PNG in this case is probably 0.0001% of the total energy we just spent getting and rendering that page, a page which more often than not contains basically static content.

If that page instead:

1. had been plain, pre-rendered HTML

2. had no JS, except if needed.

3. had no web-fonts, because the user already has 2000 fonts installed. (And you want to be green, right?)

4. And finally had that PNG.

Then optimizing that PNG would actually have an impact. On most sites today though? Not a chance in a hell.

Also: that page would render in a nano-second, so it's not just a greenification, it's an actual real world performance-optimization too.

Re:How can we, as web professionals, help to make the web mo... by bill_mon on Friday September 18, 2020 @03:51AM (#24514087)
The savings made by a single png doesn't change in this scenario, it just drowns. One thing you can do: optimize pngs. Another thing you can do: optimize js. Focusing on the largest sinner first makes some sense, but doesn't change the fact that optimizing a png will certainly save the whales.
Re:How can we, as web professionals, help to make the web mo... by searchableguy on Friday September 18, 2020 @03:38AM (#24514003)
Eh, why waste time on that when major polluters are oil, meat, packaged fast food etc.

Look up Saudi Aramco, Chevron, Gasprom, Exxon, Coca Cola, Nestle, Bayer, JBS, Tyson etc. Many of them are owned by investors. Why can't we punish investors which are very few compared to the number of web developers out there?

Re:How can we, as web professionals, help to make the web mo... by names_are_hard on Friday September 18, 2020 @04:54AM (#24514500)
Maybe your hands are clean, but I'd wager most of us are customers of the companies in that list and we benefit from their behavior. Why blame the investors and not the customers?
Re:How can we, as web professionals, help to make the web mo... by searchableguy on Friday September 18, 2020 @05:58AM (#24514876)
Most of the consumers have little choice in their consumption. Investors who are putting millions of dollars knowingly into companies that harm the environment are doing it intentionally. There is no comparison here.

It's easy to change thousands/hundreds of investors responsible for these companies than billions of consumers.

We have tried putting responsibility on consumers and it utterly failed. 90% of plastic isn't recycled. Many companies which promised to take your blue bin and recycle it sent it to China and other Asian countries. Repairability has only gone down.

Re:How can we, as web professionals, help to make the web mo... by yoran on Friday September 18, 2020 @04:21AM (#24514272)
We all have a role to play in the fight against climate change. It doesn't help pointing the finger at another group of people and say that it's all their fault and that they have to fix it.

It's like with taxing the wealthy. Everybody agrees the wealthier part of the population should be taxed more, but no one considers himself wealthy enough to fall in that category.

Re:How can we, as web professionals, help to make the web mo... by searchableguy on Friday September 18, 2020 @06:38AM (#24515082)
> We all have a role to play in the fight against climate change.

Yes. That's why I am proposing a real solution compared to relying on billions of people changing their habits which are intentionally forced on them by the environment.

> It's like with taxing the wealthy. Everybody agrees the wealthier part of the population should be taxed more, but no one considers himself wealthy enough to fall in that category.

Not comparable. Everyone who invests in companies that harm the environment get taxed heavily on their investment to offset the carbon emissions. There is no subjective wealth factor here.

Re:How can we, as web professionals, help to make the web mo... by ChrisMarshallNY on Friday September 18, 2020 @05:14AM (#24514631)
> The inefficiencies are in the chair, the users chair.

PEBCAK[0]

Personally, I still like to optimize my pages. I learned Web design, at a time when pages were supposed to be about 50KB, or less. That seems quaint, these days.

I use a lot of GIF and PNG8 images, and use CSS gradients and effects. I’ll do things like make a rollover image as a GIF in two parts, and use CSS to move the background image. Makes for a zippy rollover.

But I’m still beholden to my site framework or theme, loading 1MB of useless JS and CSS for every page. Some of the new site builders, using things like Jekyll, are nice, but take more time for me (I am not actually a Web designer, although I have written many, many Web sites).

As noted, the real hogs are on the big iron. We can write software and APIs to reduce CPU usage, but it’s a drop in the bucket, compared to the server. I think that server engineers are already doing everything they can to be efficient; simply because that confers a competitive advantage.

But, also as noted, as long as there’s a vast demand for cat videos, there will exist, a vast cat video delivery infrastructure.

[0] https://en.m.wiktionary.org/wiki/PEBCAK

Re:How can we, as web professionals, help to make the web mo... by scns on Friday September 18, 2020 @05:34AM (#24514750)
Big G prefers to send VP8/9 to save on bandwith costs. This externalises costs to users since only the newest SOCs decode in hardware. If you wanna save energy you have to use the h264ify browser extension.
Re:How can we, as web professionals, help to make the web mo... by II2II on Friday September 18, 2020 @05:01AM (#24514554)
> The inefficiencies are in the chair, the users chair.

If that is the case, then optimize for the user so they aren't running their car to charge their phone as often (or other such craziness).

My biggest problem with the article is the failure to quantify the energy use of these optimizations. Sure, it is difficult to do since there are so many variables and most of those variables are difficult to generalize. On the other hand, it should be possible to come up with relative measures to facilitate the optimization process. For example: when is it better to do something on the server vs. on the client? When will the decision even matter?

Of course, the suggestions offered by the article are also varied in quality. Some clearly offer better energy efficiency for both parties, such as not adding elements that you do not need. Others may indirectly benefit both parties: doing more server side processing on a popular website is going to benefit the consumer, but it also forces the provider to consider the cost of added overhead. Some simply have questionable merit, such as optimizing the size of resources that are infrequently used. Others are of dubious merit, such as the tendency of SEO to be used to find the provider's content rather than what the consumer needs.

It is a much more complex issue than can be addressed from a few quick tips.

Re:How can we, as web professionals, help to make the web mo... by nend on Friday September 18, 2020 @07:54AM (#24515569)
This article is the software version of telling people to reduce their carbon footprint, when the be 15 biggest ships produce more pollution than all cars combined.

I mean the articles not wrong, we should try and reduce the energy we use. But at the same time there's much more efficient ways to do so.