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.
My assumption always has been that Youtube is creating multiple renditions of videos at different resolutions and codecs.
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.
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
We can't change what's in the chair but we can change our product.
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...
Where do you find enough coins on the ground for that? I haven't come across any in my entire life.
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.
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?
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.
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.
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.
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.
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.
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.
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.