Hacker News new | past | comments | ask | show | jobs | submit login
How can we, as web professionals, help to make the web more energy efficient? (cmhb.de)
241 points by giuliomagnifico on Sept 18, 2020 | hide | past | favorite | 391 comments



Domestic computer use simply isn't a big fraction of a person's total energy consumption:

e.g. this study[1] in the UK puts "IT" as <6% of household electricity use, which is itself a fraction of a person's total energy use.

edit: and this[2] indicates that datacenter usage is also not very significant.

Therefore, no amount of optimising web pages will make a meaningful difference to carbon output.

As web professionals, it's better if we direct our focus towards more productive areas around this goal -- by e.g. donating to relevant campaign groups, or using our tech skills to produce media on the topic.

[1]: https://assets.publishing.service.gov.uk/government/uploads/...

[2]: https://www.iea.org/reports/data-centres-and-data-transmissi...


Exactly.

If I hypothetically ran an inefficient 500W dedicated server 24/7 for one 8760 hour year, and my electric utility produces 1 lbs of CO2 per kwh, that's about 2 tons of CO2 due to my programming habits per year.

Last year, I had a long commute and an inefficient vehicle. 1 gallon of gas produces 20 lbs of CO2, I got about 18 mpg, and drove 25,000 miles, mostly due to commuting, so my driving added 12.5 tons of CO2 to the atmosphere.

Instead of making my computing more efficient, I changed jobs and vehicles. Now I drive 2.5 miles to work, at 30 mpg, fill up maybe once a month instead of twice a week, and am much happier for it! If I spent extra time to do more efficient programming, I could have decimated my server's power bill, and could have saved almost 1.9 tons of CO2, but by spending that time looking for a better job and better commute, which were far more extreme, I saved about 10 tons of CO2 instead.


If you’re concerned about your carbon footprint and live within 2.5 miles of work, you might want to consider a bicycle instead! Regular cycling has made a profoundly positive impact to my life, and I would highly encourage you to explore that as an option.


I think you're right. I've been thinking for a while that the real future in electric vehicles is not Teslas or any EV to replace a car but Ebikes. Cheap, great range and you're getting some exercise and for every person on a bike. Other traffic flows better.


I'll go a step further and say that this is in a way more wasteful. For the previous commute, driving was at least necessary. Driving 2.5 miles is like having a gas-powered robot fetch the morning newspaper.


Ebikes are good options too


If you’re concerned about your carbon footprint

If he was concerned about his carbon footprint, he would think producing 2 tons of CO2 a year through programming to be unimportant.


Are those numbers accurate? Am I literally releasing _two tons_ of CO2 into the atmosphere per year just by programming?

I mean, I'm certain I'm not hitting 500W just on my MBP, but with the TV, and Switch, and the rest.

2 tons? That's staggering. Would it really weight 4000 lbs??

That's absolutely a mind blowing moment for me and I'm probably going to spend some time in the near future figuring out how much carbon my relatively low footprint (no commute, bike lots, public transportation the rest, etc) lifestyle is producing.

I think I've got some old electricity bills, and of course it must depend on your power source.

Just wild to think about how many _tons_ of CO2 are now floating around because of just my lonesome if a computer can produce multiple tons a year.


Still, atmospheric CO² is the food for plant life. We're overdoing the output of CO² by ~3 orders of magnitude, granted, but I'd guess 500W on top of basic needs should be in the ballpark of sustainability for a living entity on top of the food chain.


While I'm not disagreeing with your math, your 500w server only draws 500w at load. Most of the time its probably drawing under 175w.


I have several computers at home, but most of the time I use my 65W laptop. I am afraid my 350W desktop computer will increase my electricity bill if I use it too much.


Exactly. This is a perfect example of missing the forest for the trees.

All of us only have a finite amount of time/attention we can spend on things like the environment. It we truly care, then it's our obligation to spend that time on the changes that have the biggest impact.

Let's discuss energy usage of the web once it makes its way into the top 100 areas of potential impactful improvement. Until then, let's put our effort into pressuring our politicians into enacting meaningful change where it matters.


The one thing that could be done is to keep bloat to a minimum. It makes the web faster and less energy use is merely a bonus.


I remember doing the math of how much energy a phone uses per year, and thought I got it wrong, since it was so little.

And it's similar with computers, as you've stated (especially with Laptops that are already pretty energy efficient).

I'm not sure what we can do as web professionals honestly, but as technologists in general, maybe more of us can apply our engineering mindsets to actual climate change problems instead of building a 50th ad analytics platform.


> maybe more of us can apply our engineering mindsets to actual climate change problems

Any suggestions on how can you do that as an individual? You can easily create a generic software product alone, but to helping the climate change is really hard. OP asked exactly this, what can we do. So, what can we do instead of the 50th analytics platform?


I don't know if this was the intent, but I think an "engineering mindset" can mean analysis and heuristics for balancing costs and benefits to choose practical solutions. It does not have to be conflated with "product design" or other market-scale strategies.

In other words, you can use some engineering methodology to review and change your own behaviours as an individual and reduce your impact on climate. Perhaps after that, you can try to influence a few people around you. You should not let yourself get trapped in a mindset that any idea has to produce some viral sensation with however many million monthly users or else be discarded.

I think that techie/engineer types can sometimes develop a rather large blindspot to the many things in their daily lives that come from culture and habit. We can modeswitch from highly analytical and perhaps even obsessive optimizers on a work problem, then go repeat some inefficient or counter-productive activity in our personal lives for the umpteenth time without ever recognizing that these are also things which can be analyzed and challenged...


You can maybe start charging some of these mobile devices via Solar Power Bank https://amzn.to/2RE10uT They can charge while you walk around by placing the panels on your backpack...

I know it's a small percentage of overall use, but if enough people start using solar to charge their devices and maybe in the future laptop batteries, cars and houses it's a step in the right direction

The biggest offender is the AC in the summer in the US... office is so cold people have to bring sweaters and vests


I don’t doubt the conclusion, but does the 6% figure account for the energy cost at the data center and network nodes, or is it just the power for the user’s devices? (I’m a bit too lazy to skim through that 600 page PDF)


the 6% is electricity consumption within the home; the second link puts datacenter usage at 1% of global electricity consumption.


You aren't going to find any one category of thing that uses a "significant" fraction of total electrical energy or fossil fuel. Dismissing efforts because of that won't lead to meaningful betterment.


The 2% use for IT is insignificant in contrast to the 28% used for transport which is the most significant.

If you truly want meaningful betterment you need metrics to focus your time and effort where it will have the most impact. If you spend all your time focusing on the most insignificant thing you can make massive progress in that thing and no progress toward meaningful betterment.

Focus is very important.

https://www.epa.gov/ghgemissions/sources-greenhouse-gas-emis....


Around 90% of energy production of the world comes from coal, oil and gas, with each around 30% contribution. Simply changing our energy sources will lead to the most meaningful betterment.


As individuals, I agree. Producing media and computational tools are where we can help the most. Our industry is already geared towards "caring" (in the economic sense, not the emotional sense) about efficiency anyway. e.g. laptops have become more and more efficient, servers are more efficient (especially those deployed at big cloud vendors who care a lot about efficiency.)

Overall I'm not that concerned about our usage as it's not that bad and the industry is already rewarded for producing more efficient machines to compute.

That said, I've always thought it would be a cool project to use formal methods to prove efficiency properties or to quantify and prove the trade-offs between some more efficient algorithm and a greedier algorithm (especially in distributed systems.) But, most of that feels like developer mental masturbation in comparison to the much more egregious sorts of inefficiencies facing us (many of which require both social and technical solutions - the social one being the hardest.)


See also: Bret Victor's excellent "What can a technologist do about Climate Change": http://worrydream.com/ClimateChange/


Did you even click on the link ? The first paragraph is about how a lot of energy is used outside the household and how it’s rapidly growing.

Sure your phone is using almost no power, but the network infrastructure and the servers you are using use a ridiculous amount of power.


e.g. this study[1] in the UK puts "IT" as <6% of household electricity use, which is itself a fraction of a person's total energy use.

Why does it matter? Isn't any improvement, by definition, a good thing?

If changing some of our programming methodologies saves 1% of the world's energy, that's massive.

1% of UK energy would be 22TWh — a massive amount of energy. Just because when it's expressed as a percentage it's only 1% doesn't mean it's not worthwhile.


As a corollary, since the most carbon-expensive part of a computing project is the humans that maintain it, a variation of Amdahl's law says we should optimize for human efficiency if we want to reduce the carbon footprint.

Some things are a no-brainer, like allowing remote work when possible: that's an enormous energy savings.

It also means that development speed is much more important than execution speed in most cases. For example, yes, Python is a "slow" language. But in almost every case, it makes more sense for devs to deploy a website in Python than, say, hand-tuned assembler. The latter may require fewer clock cycles to run, but it's going to require 100x the resources to implement. That gets more difficult to quantify if you're trying to compare, say, Rust vs Go where both require similar amounts of development effort and the end performance is similar, but I think you can reasonably say that modern, high level languages are more carbon efficient than lower level ones that take longer to develop in most cases (like, that might not hold in cases of supercomputing where you're executing the code a gazillion times in parallel).


But humans don't hibernate between tasks. I continue living, using about the same amount of energy and oxygen. When one project is done, move on to the next (or have to come up with something else to do).


Sure, but look at the transportation costs alone for getting you to the office and back every day. I'd bet in the common cases where a dev is writing a web app that's not FAANG-scale, you could power the server for 20 years on the energy it takes for you to get to work that one year.

Let's put this in concrete terms: it's surprising how much work you can get out of a Raspberry Pi. An RPi 4 is almost certainly enough to host many small companies' websites until they hit a traffic inflection point. A loaded RPi4 takes about 8 W/h to operate. A gallon of gasoline has about 33 kWh of energy in it, or about 4,000 hours of RPi running time. In other words, a single gallon of gas could run an RPi 4 for about 6 months.

Suppose it takes you a month (or about 20 commuting days) to write your startup's website in Flask, and that it takes you about 1 gallon of gas round trip to work and back. Your car alone just spend about 10 years worth of server power, which is statistically much longer than that website is likely to live.

Now suppose you're a badass programmer who can convert that Flask app into assembler that runs twice as efficiently, and it only takes you 1 month to write it. Now you've spent 40 gallons of gas, and your app can run for 40 years on the amount of energy you spent writing it.

You can fiddle with the numbers a lot, but I think the general point stands: unless your code is very heavily used, it may not be possible to ever break even energy-wise by spending human effort to make it run more efficiently.


Getting to work or staying home has nothing to do with whether I'm writing C or ruby.

For the next 30 years I have to put effort into something, and the number of tasks that need to be done never ends, no matter how quickly I complete them.


Maybe, but imagine looping over this:

"How can we, as [profession], help to make [x] more energy efficient?"

It doesn't take long before that starts to add up.


Does it though? Numbers I look at don’t seem to support that.

I find these “as a profession” enactments more to be self-congratulory rituals than anything else. It is like trying to clear your disk storage space through deleting thousands of 1kb files while gigabytes of old movies are staying there hogging the most space.

Besides, I don’t understand why people has to be reduced to their professions. We are also citizens and voters, and the lion’s share of the change can only be done through policy.

The saying goes penny wise, pound foolish. Sometimes it is indeed foolish to focus on micro and miss the greater perspective.


Exactly, think about the amount of time wasted on a solved problem. You could just run your servers from Iceland which has an abundance of renewable energy and spend all those man hours on unsolved problems.


It costs $0.003 to fully charge your iPhone everyday.


Stop programming like a bunch of clowns!!!

Don't build websites on top of a million libraries which you don't need and put it in some container and host it in the cloud while using as much of the cloud service providers tools.

Build as much as possible from scratch and host it close to metal as possible.


> Don't build websites on top of a million libraries which you don't need and put it in some container and host it in the cloud while using as much of the cloud service providers tools.

> Build as much as possible from scratch and host it close to metal as possible.

Citation needed. Running your site in a container on a shared host will be significantly more energy efficient then running hardware. It's silly to claim otherwise.

And the idea that the quantity of js libraries before compile affects energy consumption is a stretch as well.

The issue is how many computations you do at runtime. That is completely unrelated to third party libraries.


I think the main problem is that most computation happens at the user's browser - the different types of hosting will barely play a role in the overall footprint of a website.

Edit: For an example, look at the app store for the oculus quest: https://www.oculus.com/experiences/quest/ - That site is ridiculously slow for what it actually does: Static text + images. And the current state already is way better than before! Almost all content is either static (the apps) or cachable (the ratings). There are barely 100 apps in the store, so this isn't exactly a case where there have to be hot updates every few seconds. This should be rendered server-side, cached, and then sent to the users as static html. The world could save literally tons of CO2 with proper design here.


> Running your site in a container on a shared host will be significantly more energy efficient then running hardware. It's silly to claim otherwise.

Probably not. Running your own hardware implies more total hardware because you're not going to be able to saturate your hardware as efficiently as Amazon/Google/MS/etc. Moreover, you'll need to hire more people to work on that hardware (doing the work that Amazon/MS/Google do for you--and let's not pretend that cloud provider work is trivial).

That said, I don't exactly understand the calculus here because it's not like you're creating people who wouldn't otherwise exist for the sole purpose of operating your hardware.

> The issue is how many computations you do at runtime. That is completely unrelated to third party libraries.

Presumably the logic is that third-party libraries cause bloat, and bloat that needs to be sent to the client every time they reload your page (modulo cache hits). And it's certainly far more energy intensive to send a megabyte across a continent than to load it from memory into CPU cache or whatever.


> The issue is how many computations you do at runtime. That is completely unrelated to third party libraries.

Citation needed. Do you have some linkable metrics on how all those JS libs are reorganized and optimized (similar to how a compiler might do it on native code) such that the call to overlay or animate on a web page doesn't call through a sizable portion of those libs on every call?


In a “modern” JS project, the vast majority of dependencies are normally development dependencies. When you see so many generally 90% of it comes from dev/build time dependencies like webpack, typescript, linters, etc.

If you write hello world in rust, you wouldn’t act as if the generated binary has all of the runtime dependencies of of the compiler, unit test framework, formatted, etc. So why does JavaScript get the same treatment?


> So why does JavaScript get the same treatment?

Because very frequently sites with minimal functionality have large piles of javascript. Web sites which should take milliseconds to launch take seconds instead. Some of this is ad-tech, but a lot of sites are overloaded with junk before the ad-tech gets stacked on top of it.

Look at moment.js, the most used date library on the web. It is exceptionally common for people to add a library like that to a site to add a few basic bits of date parsing. (And yes I know moment is being sunsetted).

Even if you assume these big piles of code do nothing once they are loaded, passing around and parsing big chunks of Javascript every time you launch a web page is a waste.

Though as someone else pointed out above, web pages are not a big contributor to Global warming. It's just a frustrating, time consuming waste in most cases.


> Running your site in a container on a shared host will be significantly more energy efficient then running hardware. It's silly to claim otherwise.

It certainly depends on the scope of the site. My personal sites? If they run on their own bare metal, it's a waste because they're idle to nine nines. My previous work sites? www filled up four machines, so bare metal was more efficient.

What would be most efficient for my current sites is an old school shared host --- no containers, one httpd, etc. VPS is more fun, but you can't fit as many mostly idle customers into a single box with that.


> My personal sites? If they run on their own bare metal, it's a waste because they're idle to nine nines.

Your site is only busy for 31 milliseconds per year?


pretty much yeah. it's a static html

      <html><body><h1>It works!</h1></body></html>
(I stole this from Debian)


Seriously!

For the "client side":

The web is responsive by default, making it not friendly to screen readers/phones takes extra work.

Semantic forms are great. You're writing a machine readable description of an API that auto generates a GUI. Theme it with some CSS and leave it alone.

No one likes downloading piles of javascript to load text documents.


> The web is responsive by default, making it not friendly to screen readers/phones takes extra work

Oh, the irony of the iPhone. When it was launched, its unique proposition was that it was the only phone which could render normal webpages, while previously specially tuned XHTML code and handheld stylesheets were required. And what did we do with this? We started the era of specially crafted mobile sites and mobile first.


You are not getting it. Cross device compatibility is not a simplistic notion that the desktop ui just needs to reflow and scale down into a smaller screen. Properly done multi device support will recognize different “job to be done” in mobile vs desktop. If approached the problem space in this way, then you end up with different ui in mobile than desktop, for many applications


Mind that the USP of the iPhone was its ability to render a view into a full-size desktop view with full Webkit capabilities, which was meant to put an end to any special handheld formats like WAP and XHTML + handheld CSS for mobile. If it had been meant to require a dedicated skin, chances are that Apple would have specified a special multitouch media attribute for dedicated stylesheets. Whether rendering desktop views on mobile would have been ideal under the aspects of usability and/or UX, is a different question. (However, I think, developments were originally more driven by the want for a "native UI" experience.)

Regarding "not just a simplistic reflow", if you take this notion seriously, this applies not only to the presentation of content, but also to the content itself. Notably, shorter, less "baroque" copy text for handheld devices, but richer text and more related or in-depth information on the desktop. However, I've never seen purposefully redacted content like this, targeting multiple platforms. Instead, it's mobile first also for content on the desktop, where often a mere couple of paragraphs are meant to be a full article or blog post.


>I've never seen purposefully redacted content like this, targeting multiple platforms.

When your user base consist of different personas, doing distinctly different job to be done, one option is to tailor the application for each scenario.

Depending on the consequence of the app and the business need, ideal UX needs for each persona may no longer seem superficial to ignore. A normalized experience may be a show stopper. In that case it's worth it to invest in building/maintaining different view / functionalities, specific for the user agent type. If you go even further in this direction, then you invest in building a mobile app, to suite the use case of mobile and desktop.


IIRC it was more because of screen size and finger input. I had a Treo before an Iphone and the stylis made liquid/responsive sites very usable without huge buttons.

Still, both then and now mobile requires reducing options to avoid lots of zooming and panning. And less JS is better.


Mind that "programming like a bunch of clowns" isn't about the programmer's convenience, but all about a replaceable work force. It allows tech companies to manage without owning any specific knowhow (it's all "in the stack") and allows them to hire a bunch of programmers to fiddle around a bit in the first year and then a totally unrelated bunch in the next year for finalizing things ("the app").


The irony here is that programming languages and their native APIs are (apparently) not considered part of the stack™ and must be kept away as far as possible from the hands of developers, since this introduces the danger of injecting knowhow.


Programming languages are general purpose. When you build a specific solution, why opt for a general purpose raw language, when a framework provides a richer set of purpose specific tools? Why get al dogmatic about programming purity? When you don’t intent to use the language’s raw api to that an extend, then your stack is more represented by the framework, rather than language.

Not discounting the necessity of mastering the language to be a strong engineer. However the framework being used is just as relevant, if not more so, than the underlying language


> "When you build a specific solution, why opt for a general purpose raw language, when a framework provides a richer set of purpose specific tools?"

A web framework is often a one-size-fits-all solution designed to handle a variety of use cases, some of which conflict with each other. Like a swiss army knife, it does everything but none of them particularly well.


While I share the sentiment I don't think this is going to help.

One of course wonders what else my computer is doing to render a piece of text/graphics I want to read/view and if all that is necessary and why I have 1Gbit Internet and still feel like I was on modem (sans blinking lights, linkup sounds and phone bills).

Unfortunately, the person or people that will try more energy efficient client side will loose to ones that will use the newly gained performance to waste it on another cool effect.


> Stop programming like a bunch of clowns!!!

This would be great but it won't happen without monetary or regulatory intervention. The industry is hell bent on driving the cost of software to zero. Security, performance and accessibility are always the last to see any investment. The baseline seems to be as long as your website doesn't piss people off completely then it's enough.


>> host it close to metal as possible

Wouldn't it be less efficient to host something myself than to use some cloud provider?


I moved all my stuff to a home server, it pulls about 45W and costs me roughly £5/m in electricity costs. It will take about 2 years for me to recoup the hardware costs with savings over what I was previously paying for a VPS.

The one major improvement over renting a VPS is that I've now got a large RAID array with many terrabytes of storage, where I previously only had a few hundred gig to play with.


You're saving money, but this doesn't necessarily translate to energy savings, the excess you were paying was overhead for the VPS company.

While a server in a typical DC would use way more power than a home system, it's also theoretically possible that they are running at near 100% load, meaning all that energy is used doing SOMETHING, whereas your home PC is burning watts at idle.


You can use a single bare-metal server for 20+ services. I've done it and it's a solid setup (with minor exceptions). Plus, that's what cloud providers do anyway.


One specific, general recommendation: add pagination and browsing by date/cost to sites, instead of just relying on infinite scrolling.

I'm often interested in older/cheaper/less-popular articles/products/bits of information, but I'm often forced to scroll eternally or perform several clueless searches to find what I want to find. I can only imagine the extra, useless database queries infinite scrolling requires... not to mention how much and how thoroughly I hate it as a user.


Playing devil's advocate: use every library under the sun even when you don't need, and make websites so unbearably slow that getting off the web and going for a walk becomes an attractive option again.

More realistically, maybe don't cherrypick ideas to make up correlations that don't really make sense, and instead do actual environmentally net positive things like buying less stuff or donating


Bloat accelerationism? I suggest we start packing email to the gills with Javascript next.


That first paragraph was exactly what I was thinking as well. :)


> Stop programming like a bunch of clowns!!!

This was my first thought too. It's frustrating to see these questions when the answer is blindingly obvious to someone who takes even a small amount of time to do research. It makes them read as if they're all asked in bad faith, of which I am not convinced they are not.


Clearly the (blindingly obvious) answer is that this industry is run by clowns. With the mere exception of some enlightened guys on HN. Incredible what high horse some people here ride on.


Except it is not "run by". It is caused by collective stupidity inherent to any group of random people that causes collectively suboptimal choices to be optimal from the point of any single group member.

With all the processing power and bandwidth I still feel the Web is much poorer than it was 20 years ago.


I do not think "the industry" is run by clowns. There is just a toxic subset of the community that writes a lot of bad software and refuses to accept that that could have been avoided by performing some actual study. That's not a high horse, it's just having an interest in what you do and doing the best that you possibly can.


I might be in the minority here, but I appreciate your toning down the hostility of this discussion.

I believe if per the article, "the entire network already consumes 10% of global electricity production, with data traffic doubling roughly every two years" the article/share seems like a valid question/concern for the community.

Do designers contribute to the problem? Surely yes. Should "all designers should learn to code"? I don't think so. Besides seeming impractical, it sounds like a security nightmare. Perhaps only coders should be allowed to design? /s

Seriously though, designers should know that an incredible UI that loads slow is still a bad UX. They should care about this- even if they're not trying to save the world.

I'm curious what this means in context: "who the industry is run by" (i.e. Google?) and also the referenced "toxic subset" (i.e. Advertisers, Bitcoin miners?)

I know where I'm posting this (please don't hit me!) but I kind of wish this didn't provoke such a "developers vs everyone else" reaction. As right as the accusations of clownery and bad acting may be, honestly it just feels like a blaming the user.

One thing I haven't seen brought up in other comments (if it has I'm sorry if I missed it) is javascript timer throttling. I think this kind of solution is really positive because it has minimal negative impact on user, doesn't require a million websites to change, and saves a ton of energy. https://docs.google.com/document/d/1sd9EVERCtRWKvnJXnP3iZ83f...

Can we engineer more solutions like that?


I would like to say the industry is run by the people that create it. In practice, it is also run by people in the periphery.

When I think of toxic devs I think of being dismissed when I talk about attention span and optimised page load speeds. And perhaps devs who feel that what is currently normal in javascript land (not knowing your stack, many dependencies, perhaps feeling like electron is an okay solution for a very simple problem) is acceptable because that's just how it's done right now. Both of those schools of thought have reasons for why they are so wide-spread, but they're wasteful and in my eyes an example of lazy engineering. That's acceptable as a conscious choice, but not as a default solution.

I actually feel as if most of the designers understand efficiency better than the really problematic devs (especially as it relates to page load speed), but maybe I've met mostly really nice designers :)

There's a lot of patching that could be done at the browser level and I think what you've proposed is a reasonable choice. The nice thing about timer throttling is that it's relatively easy to implement and nothing of value will be lost.


I am listening what justification you will bring for my browser downloading 3MB of crap to display 500 bytes of actual information which requires zero interactivity, and for sure does not need you hijacking the scrolling.

The problem is that web devs got so involved with their toys, that the toys themselves became alpha and omega. Use case, users, accessibility: who cares! All I know is React (mind you, not even JavaScript, but React), so I will build everything with React. And maybe throw MobX in, because I just happen to learn it.

Watching what's going on is part-amusing and part-horrifying. Alas, the latter part grows faster.


If one is experiencing cognitive dissonance and the only apparent solution is that everyone else is a conniving idiot, then this is a very strong signal that something is amiss from the understanding of the situation.


I do not think everyone is an idiot (conniving or otherwise), only some people. There's also definitely no cognitive dissonance anywhere in evidence.


does this actually move the needle? it sounds a bit like trying to avoid braking so much in one's car as a proposed solution to curbing carbon emissions. maybe it helps in some sense but how much, actually?


None of those optimizations matter in the context of energy efficiency, to make a material difference for global warming


> Build as much as possible from scratch and host it close to metal as possible.

come on guys this is obviously sarcasm


Ban Javascript, program server side and output simple HTML and CSS.


Do you have any data that shows rendering server side uses less energy than rendering client side?


Energy efficiency is a bad substitute for clean energy. We desperately need vast amounts of clean, emission free energy, to power electric vehicles, trains and tractors, the infrastructure used in their manufacture, the economy as a whole and the quality of life of the other 5 billion who lack internet.

The energy that we stand to save on the web, in the best case, is no more that the equivalent of a few points of GDP growth for some impoverished nation. It's less than negligible, it's net negative, because you are wasting the political and human energy optimizing irrelevant things and thinking you've made a difference.


> Energy efficiency is a bad substitute for clean energy. We desperately need vast amounts of clean, emission free energy

We need both.


And in the long run, energy efficiency is the thing we need.

In a more distant future, we'll be able to use energy to clean up the damage from using a dirty energy source. When that's possible, when you'll be able to wrap full cleanup costs into EROI, then "clean energy" will only mean "more efficient energy source".


Not really. Once we’re on renewables we can just let market pricing wipe out things that aren’t efficient enough to be worth it.

Efficiency gains affect only tiny slices that are outpaced just by growth. They serve to be nothing more than a distraction for intelligent people to sink their time on and feel helpful when they are not.

Clean energy works and the solutions are simple but difficult to implement because it has to be replicated all over in the face of politics and NIMBYs. Efficiency gains are a waste of time but they are attractive to engineers in various industries because they are intellectually challenging and narrow enough to be easily implemented.


> Once we’re on renewables we can just let market pricing wipe out things that aren’t efficient enough to be worth it.

Only if there is something that can compete on efficiency and price. And transitioning to renewable/sustainable energy becomes easier if consumption is lower.


Some from column A, some from column B.

The important thing is to apply the efficiency counterpart of Amdahl's law and target the efficiency improvements first at elements which make up a large part of consumption.

Turning off mobile chargers? Optimising PNGs? They're not a large part of consumption in the first place, so it makes no difference.

Switching all lightbulbs away from incandescent has made a huge difference.


The less energy we use, the faster we can be on renewables.


The Energy Transitions Commission outlines in a recent report three steps for a net-zero future. They argue the first step should actually be to focus on efficiency and reducing consumption. See https://www.energy-transitions.org/publications/making-missi... for details.


No, no it doesn’t.

> In its new report Making Mission Possible – Delivering a Net-Zero Economy, the Energy Transitions Commission (ETC) shows that clean electrification will be the primary route to decarbonisation, complemented by hydrogen, sustainable biomass and fossil fuels combined with carbon capture. It urges governments, investors, corporates and civil society to work together to accelerate the deployment of zero-carbon solutions before 2030 to put mid-century targets within reach.

The first step:

> Speed up the deployment of proven zero-carbon solutions – governments, investors and corporates need to work hand-in- hand to build up massive capacities of zero-carbon power generation to enable the clean electrification of the economy.

The focus is on generation, not reducing consumption.


No, internet infrastructure consumes a vast amount of electrical energy. Some put it at 10% of the global use of electricity. That's a lot just to store, process and transfer bits. Curbing that would definitely make a significant impact.

Sure, it won't solve the bigger issue in one fell swoop. No single action will. Instead, the way to realistically make progress is via the accumulation of small improvements everywhere.


Currently, the entire energy consumption of servers stands about 2% of global electricity consumption, which itself is just one of the major emissions sources that include transportation and shipping, agriculture, residential heating etc. And 10% of that 2% is the insanity of cryptocoin mining, which by definition cannot be optimized since it's a system that ultimately competes on burning electricity: https://fortune.com/2019/09/18/internet-cloud-server-data-ce...

It could be 10% by 2030, based on projections made by experts in "sustainable ICT", which sounds self serving to me, and likely to ignore the massive energy demands of growing nations in other sectors.


I wish some green party would propose banning of crypto mining, since it wastes lots of electricity and creates no real world value that is useful for anything. Like running a factory making bread is useful, you need to heat the owens. But you really don't need to mine for cryptocurrencies to survive.


> That's a lot just to store, process and transfer bits.

Thats what the infrastructure does not what it is used for.

For example those bits are analytics and algorithms used by logistics companies so they can transport goods more energy efficiently saving a lot more energy than was spent on the computing.


No, that won’t help. Even a 25% gain in all things Internet (which is almost certainly a fantasy) is only 2.5% of global usage in your worst case scenario. That’s outpaced by growth so spending the effort instead on more rapidly rolling out solar/wind and replacing 5% of generation goes much further and can’t be undone by a software update with a new GIF feature that sucks power.


So you'd rather have others contribute 5% than working yourself on getting these other 2.5% that you can do something about?

Btw, given the inherent thermodynamic inefficiencies in active datacenter cooling I'd be surprised if we can't do better than 25%.


The total overhead, including cooling, is only ~10% for Google datacenters [0], and the other cloud providers are likely similar. Efficiency gains of that scale probably need to come from somewhere else.

[0] https://www.google.com/about/datacenters/efficiency


Yes, the 2.5% number is best case for a complete upheaval of how things work right now. That’s a waste of effort societally speaking when literally 100% of electric generation can be replaced with renewable energy.


That's a big number and we can do both. Many peoples skills here are more suited to improving internet power usage vs helping roll out wind and solar.


That’s great if you are in a position to influence energy production. Many are not, and are looking to contribute in whatever way they can.

Probably the most impactful thing you could do is to create web experiences that adequately substitute for carbon-intensive offline experiences. Teleworking, for example, is much cleaner than commuting long distances by car.


I encourage you to look at the work of Vaclav Smil [1] . There's no such thing as clean energy.

[1] https://www.youtube.com/watch?v=5guXaWwQpe4


Fine. Energy with no marginal carbon emissions per unit produced.


In the great scheme of things, sure, that's true. But we need much cleaner energy at current prices.

If you watch from around the 1h22m mark, you will see that he conceeds there is no such thing as "energy conservation", and that what he argues for actually is an increase of at least three times the in price of energy and food. Well, that's a non-starter even if you accept the philosophy, it will lead to revolutions and regime changes, it cannot possibly work.

So we absolutely need to maintain the relative standard of living, while significantly cleaning up energy. A 5x drop of our carbon intensity can lead to a more or less ecologically sustainable world economy where billions can enjoy the western standard of living without fucking up the planet in less the a century.


> it will lead to revolutions and regime changes, it cannot possibly work.

While we're all comfy with cheap energy and produce, IMHO revolutions and regime changes aren't neccesarrily a showstopper. With +2℃ we will have regime changes, lots of refugees, probably revolutions, while hopefully avoiding war.


But the timescales are entirely different. To prevent +2°C a few decades or a century down the road, politicians need to make today moves that are guaranteed to leave them unemployed in the best case and and possibly even guillotined. It's simply not fathomable, whoever proposes a 3x increase in the price of food and energy as a solution for anything has no connection to reality.


Energy is used to transform things. A high energy society is a society that transforms a lot, and hence will quickly reach ecological barriers, no matter how clean the energy is.


Emitting carbon is just that, an (unintended) transformation of having energy. Yet we are trying to curb it, and we could do the same with the rest. It't not necessary that all transformations will leave permanent ecological effects. For example, vast amounts of energy could be used to ferry people from Newark to Tokyo for shopping trips in some electric craft that will leave behind only a slight temperature rise of the atmosphere.

I do agree though that with unlimited energy many people will want multiple vacation mansions each somewhere in the wilderness. We need to handle that like we do with carbon emissions, limit it and tax it to high heavens.


Yes we need clean emission free energy more (at the moment), but not everyone has the skillet to investigate on clean emission free energy. We are with seven billion apes on this planet. More then enough brainpower to focus on stuff simultaneously I guess.

Also software is really very inefficient and a lot of it runs on batteries.


We need to use both.

There isn't much focus on the end to end energy usage (I've only seen a couple of papers over the last 10 years or so).

I have no idea how much energy it takes from the place this page is served to it being rendered in the browser, that information should be available so we can make things more efficient.


Exactly this. We can't focus on reducing costs easy, what we can is focus on obtaining energy easy and clean. Civilisation energy demands will only grow. So focusing on web taking 1% less energy will not be as impactful to all of us as pushing for more green energy.

I think the biggest issue now is not ability to generate energy ( we have passive and active green energy sources ) but Storage.

And It would probably be for the best to find kinetic ways to store and release energy. Ofc I might be wrong and in the end batteries and solid state batteries solutions might be the winner. But I think kinetic storage is kinda low hanging fruit not many companies are looking into.

Also kinetic energy storage usually shouldn't degrade as fast as fluid based batteries.


We might end up with a Jevons paradox. Remember that clean energy is not (usually) carbon-zero.

https://en.wikipedia.org/wiki/Jevons_paradox


Not might, rather certainly. Which is perfectly fine if the resource consumed is in near infinite abundance (nuclear or solar energy).


Energy efficiency drives clean energy more than other combination of factors. To say one is a bad substitute completely ignores economics and basic cause/effect.


No one suggested it as a substitute, which means you had this thought before you read OP's link and are using this as a tirade to seem intelligent. Not _everything_ is mutually exclusive.


Stop including megabytes of javascript in every page, and composing pages from 100s of requests to microservices. In short, keep things simple.


Maybe don't make autoplaying videos? Those must use up bandwidth, maybe more than javascript. They also use power to decompress on client side.


I find it disappointing that so many sites pull down so much JS that a video maybe uses more bandwith.


It’s a fascinating failure as an industry - there is a ton of infrastructure around media optimization but our attitude about adding JS dependencies has been “there’s always room for one more”. I’ve seen more than a few cases where someone loaded an image optimization library where the JavaScript used more transfer, CPU, and memory than the original images, as if this wasn’t one of the easiest things to measure.


Here are two utterly trivial examples of some JS;

    for (let x=0; x < 10000; x++) {
        if (x===0) console.log(x);
    }
versus

    for (let x=0; x < 10000; x++) {
        if (x===0) {
           console.log(x);
           break;
        }
    }
The second one is more code but much more efficient. Having a smaller amount of code doesn't translate in to having faster or more efficient code.

This is the basis of most optimization work - you're optimizing code to do the minimum amount of work, and very often that means writing more code. A moderately complex React/Vue/Svelte app will be much more energy efficient than a naive vanilla JS alternative because most frameworks to clever and hard things to reduce the amount of work that's done in order to increase performance, and a side effect of that is using less energy.


> A moderately complex React/Vue/Svelte app will be much more energy efficient than a naive vanilla JS alternative because most frameworks to clever and hard things to reduce the amount of work that's done in order to increase performance, and a side effect of that is using less energy.

I would debate this, the black box abstraction provided by react, et al. would probably wipe out any performance benefit.

It's all in how you write the code. I've (as an end user) muddled through tons of slow react apps, and used some highly performance vanilla js (or just "framework-less") apps.


React is not an abstraction, and to be honest the fact you are calling it that kind of makes it easy to dismiss your post here.

But you are right that it's mostly all down to how you write the code. But I'll gladly argue that it's a lot easier to write bad, inefficient UI code with vanilla JS than with React.

You don't really get to see the alternative because generally, react makes things so much easier and efficient that it opens a lot of doors and allows companies to go crazy with features and bloat. By being the beast it is, it puts a lot of power in the hands of developers, but equivalent UIs without react will most likely be 3 magnitudes worse. Keyword: equivalent.


Similarly, asymptotic complexity is not always an adequate approximation of energy consumption.

More code leads to more cache misses. More code leads to more energy consumed transmitting that data over the internet, and wireless radios are energy-expensive. More code leads to more time parsing, compiling, optimizing, and then JITing code, which can utterly dominate actual runtime energy cost if the program is not long-lived - which describes a lot of webpages.

Finally, very few webpages actually need to even be a "moderately complex React/Vue/Svelte app" - the essential complexity to the task being done is low, and webdevs add extra, unnecessary features for very poor reasons (showing off?). Take https://nabeelqu.co/understanding for example - 1.17M downloaded for 21K of text and two small images (one of which didn't load anyway). There's a 276K JavaScript file in there, among others - and the primary purpose of this page is to display a static document. Or, take any modern newspaper website you want - bloated with images, tracking, and JavaScript providing near-useless (and probably near-unused) features with a data-size:content-size ratio of over 100. If something is moderately complex, it would be much better as a native app in the majority of situations, which comes with significant performance improvements.


If you write it from scratch you could just get straight to the point with

    console.log(0);


It's an incredibly trivial example. With real world code you can't always do that. I hoped that would be obvious.


It was pretty obvious...


With the code above, an optimizing compiler might actually produce this line.


But the simplest thing to do would be return after logging 0 rather than loop thousands of times for no reason. By that I mean, the second example in my eyes is simpler.

The simplest code as you point out is often faster than the shortest.


But what should we do when things are actually complex?

There is a lot of negativity here on HN on the same things you mentioned, but I fail to see any viable alternatives.

Like what? Replace the MB of JS with plain Html and forms? It's not going to be simpler to code, and it's definitely not going to be simpler for the users. Or maybe use a native desktop app? Then it's even more complicated for the users, and coding it leads you in world of cross platform pain. And the closest thing there was to not using MB of Javascript and have decent UX was Java and applets/jlnp, but it somehow didn't manage to be widely adopted.


Shot in the dark here, but perhaps you could try leaving the functionality the same and just try taking out all that code that tracks every pixel the user looks at, for how long, and how they can better market porn to that user...seems like that stuff could be taken out...


What programmer wants to add those things? Ads have been the bane of the internet for 20 years, how many times has a developer excitedly clamored to ruin their performance metrics, layout, security, etc with more ads? How often are programmers arguing for incredibly complex UI elements over the native (and trivial to implement) alternatives?

Programmers don't choose these things, because programmers aren't the real decision makers, it's management and business that makes the web awful.


> What programmer wants to add those things?

The one that wants to keep their job.

> How often are programmers arguing for incredibly complex UI elements over the native (and trivial to implement) alternatives?

The existence of Bootstrap and Semantic UI suggest that programmers are in fact often arguing for incredibly complex UI elements over the native alternatives.


Are you saying that the executioner is not a murderer because he doesn't make decisions about who to execute and who to leave alive ?


"how many times has a developer excitedly clamored to ruin their performance metrics, layout, security, etc with more ads?"

Depends how much traffic they have I suppose. I'd be pretty excited if ads bought me a Lamborghini for every color of the week because Tuesdays right now are pretty boring.


Of course, I tottally agree. I am not talkng at all about tracking, and 3rd party services at all.

I was talking mostly about the actual application logic and presentation.

BTW tracking is hapening even w/o javascript.


Its not adds its shovelling massive amounts of bloated JavaScript frame works in and hoping for the best and in a lot of cases just not understanding how to structure a website.


I wonder what the economic impact of doing that would be.


If everyone did that? Probably very positive in terms of energy and resource use, positive in terms of less things to worry about for the businesses - and very negative for all the bullshit adtech jobs that wouldn't be needed anymore.

So strongly positive, in other words.

One has to remember that marketing and advertising have a big negative-sum-game component going on, where most or all of your marginal effort to promote your product serves only to cancel out the marginal effort of your competitors to promote their products.


>If everyone did that? Probably very positive in terms of energy and resource use, positive in terms of less things to worry about for the businesses - and very negative for all the bullshit adtech jobs that wouldn't be needed anymore.

It's not just the annoyance factor, it's the bloat from ads. In fact, something like 48% of retrieved data[0], on average is ad related.

Getting rid of those ads could cut client (and server and network) energy draws significantly. And we could further reduce energy usage by not needing add-ons like ad/tracking blockers and stuff like NoScript[1].

I browse with js disabled and, unless I need to visit a particular site, I'll just close the tab if js is required -- as the bloat, the security risks and the hubris of js overuse is just too much.

[0] https://www.nextpit.com/ads-consume-half-of-your-mobile-data

[1] https://noscript.net/

Edit: fixed spacing of referenced links.


For almost every "web professional", the things they do are not complex. It follows then that the likelihood of this question (to a reader that doesn't know you) being asked by someone who simply doesn't understand what it means to be simple. The casual observer is further lured down this path of reasoning because of your implications that a plain form is somehow worse than something mediated by megabytes of javascript. In almost every case you'll find online, this isn't true.


Why wouldn’t it be simpler to code? When you do server side rendering with HTML forms you reduce complexity by having more pages.

It is somewhat more complex to handle more pages in your code base, but each page is short and simple.


State management is harder to do when running an app with a 50/50 split across browser and server.

You end up with a lot of complexity around cookies/local storage (and trying to persuade users that cookies are not bad and that their virus checker should not delete the cookies please ...) or encoding the session ID in the URL and hoping that users do not share links or bookmark pages, and then of course you end up with the "please only click once" links around buttons etc.

You also now need two teams to code the front end - one that knows HTML etc, and one that knows the backend-frontend language (although could be nodejs of course). It is an extra interface that needs to be designed and maintained with all the opportunities for screwups that come with it.


I've written apps like this and have to wonder what on earth you're doing because this is very straight forward.

Put a session id in a cookie and use a relation table to point at the tables owned by the user. This takes very little code. The alternative is managing a distributed database, half of which has to run in the browser. That actually sounds much harder (although not surprising for a startup.)

If users are deleting first party cookies than it's their own fault. Tracking state on the website you've visited is the entire point of cookies. If the user throws their phone on the ground really hard your website also won't run on it.


Yes, lots off apps today have the entire schema replicated in the browser, which means that every schema change you do in the backend must be replicated in the frontend. Madness.

If your UI is a copy of the database why not just give the user a phpmyadmin login instead?


> why not just give the user a phpmyadmin login instead?

The guy at the previous company said we can't do that.


You can use one of the many servers that manage the users session for you and only override it if needed. Is there any real problem with a server that uses a cookie to only store the users session ID, storing the other data related to the session ID on the server? For most sites I wouldn't think there would be any issues with it.


Why would you need all that state management in the frontend if most of the rendering is on the backend?

We already have two teams today, one for the overly complex frontend and one for the backend. Solution to that is server side rendering and full stack developers.


>You also now need two teams to code the front end - one that knows HTML etc, and one that knows the backend-frontend language

Or, you could hire some full-stack developers and let them split the work more efficiently.


You don’t avoid using JS at all but only use it where it benefits the user. For example, the users benefit from having those forms having nice validation, dynamic lookups, etc. but they don’t benefit from using a vDOM on top of the far more efficient browser DOM or loading an entire general purpose templating framework instead of just using the DOM to update an existing form.

Those are things which developers do because they think it’s easier than learning the web standards or looks better on their résumé and as long as you avoid measuring actual performance you can sustain these beliefs for a long time even while your users are seeing performance below the level of a 2000s Rails app with worse error handling.


> You don’t avoid using JS at all but only use it where it benefits the user. For example, the users benefit from having those forms having nice validation, dynamic lookups, etc. but they don’t benefit from using a vDOM on top of the far more efficient browser DOM or loading an entire general purpose templating framework instead of just using the DOM to update an existing form.

I am sorry, are you talking about example todo app ? because for most apps with complex navigation, data entry, and validation this is absolutely not true. Just use the DOM , might be somehow feasible with webcomponents, but they are years late to the game.


> most apps with complex navigation, data entry, and validation this is absolutely not true.

You mean we just imagined all of that existing? You could make an argument saying you personally haven’t learned how to do it but that’s a far cry from “absolutely not true”.


Developer can stop using webpack to bundle 3rd party libraries. Let browser cache it.


Cross origin browser cache is a no-go for Safari (and hopefully other browsers will follow suit), 3rd party scripts from a CDN are not cached across different domains. The only way to properly cache things longterm is with webpack records, but not many people can bear with the added complexity of maintaining them in their pipelines.


+1. If you're only targeting evergreen browsers you can already use syntax like `import Library from './library.js'`, plus lots of modern ES6 features.

For IE11 just load polyfills and let the 2-10% of IE11 users pay the tax, instead of making all your users in modern browsers download giant bundles.


That's not a solution; making simple stuff is harder than doing complicated stuff, and it costs much, MUCH more.


This is a dangerous question but - why is that the case? Why is simple software so much more difficult to write?


Anyone can write a sequential .py file with redundant if/else statements. It takes more than 1 hour to learn how to refactor that into concice functions or objects. It takes more than 100 hours to learn how to golf that into 30 bytes.


"Simple software" does not mean "golfed". Quite the opposite, actually.

What the grandparent is suggesting is using simpler architectures, not necessarily smaller (in the code-golf sense) code.


Fair point, but at least part of golfing is cutting out anything redundant (although much more than that, which can get into obfuscation territory). Code I'm impressed with is generally when it gets the job done in the most concise/simple (while readable) manner. That is by rule done by the most experienced programmers.

To paraphrase Pascal:

> I would have written a shorter letter, but I did not have the time.


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.


> 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.


> Youtube encodes the video only once

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


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.


Don’t forget most videos see very few to no views (private/unlisted and people are mostly boring)l


That has a negligible impact on the ratio of <view time> / <encoding time>


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.


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


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.


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...


> 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.


You don't, that was kinda my point :) she'd find maybe 1 eur a month if lucky.


Have you looked?


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.


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.


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.


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?


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).


> 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.


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.


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?


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?


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.


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.


> 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.


> 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


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.


> 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.


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.


> “But Carl, some of us don’t have the luxury of building super high-performance, lightweight, and optimised sites due to client budgets and deadlines.” Well, I think you need to work on your craft, change your attitude and your priorities, or find another profession.

Well, I think my employer doesn't care much about this topic, so I feel like you're talking very condescending to me, while I have little to no control over issues like this.


You need to start trying to change your employers/clients mind on this - show them what the cost is by having 5MB uncompressed images and massive blocking JavaScript.

"look you having to pay $xxxxxxx in PPC" because that low cost design agency messed up a site redesign.


> You need to start trying to change your employers/clients mind on this

Then don't they needs a new job? Thats not part of a developers job description.


Is not a developers job description building the site or fixing the damm problem your given?

To give an example from my fist job about two years in one morning my boss came in and dumped on my desk some exotic kit from Feranti that cost 2x my salary with the instructions

1 hook it up to the PDP 11 make it work 2 talk to Brian and write the code so he can use it on his 3d capture experiment.

My response was "cool"


One thing that I struggle with, as someone who is not a policy maker, is understanding the proportion of carbon emissions associated with different activities, for example, what would be the carbon emissions savings of these different options:

- The yearly energy savings of optimizing millions of web pages to reduce server side and local energy consumption?

- Banning personal vehicle diesel engines for 12 Months?

- Not shipping tonnes of tropical food across the Oceans for 12 months?

- Everybody not buying new clothes for 12 Months?

- Everybody not buying a new electronic device for 12 months?

I am not claiming that we should all go amish and bankrupt entire sections of the economy, my point is, these are all direct ways to curb carbon emissions but I have no intuition of how big of a dent in the overall emissions each option would make.

What are the carbon emissions that, if curbed, would provide the most bang for buck if you will?


I think we should create a carbon/pollution tax and let the invisible hand of the market figure that out - it's too complex and there are so many side effects to adjusting things by brute force!


A carbon tax implemented by a "world dictator" would work.

Any individual country implementing a carbon tax doesn't work because they put themselves at a big disadvantage, and goods and services go across country borders, taking with them almost-impossible to fairly calculate amounts of carbon.

The biggest things the world could do towards the "world dictator" approach would be:

* Have a consortium of countries implement a carbon tax, while taxing all inbound goods from countries that don't tax carbon.

* Adjust WTO rules to allow taxing imports based on estimated carbon content.

* Have the WTO decide which countries are "on track to meet carbon reduction targets". Allow taxes on imports from any country that isn't.

* Allow countries to "sue" another country for environmental damages. When they don't pay up, have a UN court able to threaten anything up to military action/takeover of the country's leadership to get payment.


You really only need the US to implement it as they're the consumer kings of the world. You can't just go sell a million SUV's to the Russians or Europeans or Ethiopians because you didn't want to pay the carbon tax in the US.


Problem is free trade & WHO itself, it is easier to go back to tariffs, by making things more expensive people will consume less, you can also increase quality & add requirements that a product must reparable.


Does that actually work?

I would think the invisible hand of the market would re-route all that pollution to areas without the tax and the earth wouldn't see that much difference. It's not like they're going to stop selling oil if the EU and US agree to stop burning so much of it.

I agree it's complex, but I think carbon taxes might be part of the complexity. If we're going to start messing about with markets, we should outright ban the offending activity and regulate harshly. If we're going to apply tokenomics to the problem and pretend we fixed it until we're too old to care, that seems worse somehow.

Or we can just do nothing and hope technology saves us. That's what the actual bet is whether we like it or not.


There are very reasonable legislative proposals for a carbon tax (most preferably a "fee-and-dividend" [1]) which apply border adjustments to imported goods based on their carbon footprint.

This prevents the tax from simply causing the production of the goods to move overseas, and also encourages your country's trade partners to adopt a carbon tax themselves (so they'll be exempt from the carbon tariff).

Such a policy is not attempting to distort the market so much as simply price in an externality that is currently causing the market to perform poorly. It says simply that, while I am still allowed to hop on a 3000-mile flight to visit San Fransisco for the weekend, I need to compensate you and your family (and everyone else in the country) for the associated damages.

On the other hand, because human civilization is so complex, outright bans and strict regulations on emissive activity are inevitably going to be ham-handed and will either be ineffectual or else too onerous to be politically viable in a democracy.

[1] https://energyinnovationact.org/


> apply border adjustments to imported goods based on their carbon footprint

The original question was how to find out the carbon footprint of goods.


That is true. But finding out those numbers is a much bigger problem for you or I than it is for a national government that can dedicate full-time research staff to producing sensible estimates.

So a benefit of this policy is that environmentally conscious private citizens no longer need to feebly grapple with such questions. You and I just optimize for personal expense and our own happiness while computing the carbon footprints of various things is the responsibility of institutions that actually have the resources to do it.


If a company is trying to obfuscate you could just have a high base rate you apply to them until they pass an audit to prove that they have an actually low footprint.


We do know that when the price of oil goes up people buy smaller and more economical cars and when it goes down they do the opposite.

If the market re-routed around that by building electric cars for instance then isn't that exactly what we want?

The nice thing about fossil fuels is it's fairly easy to identify and tax extraction. The problem is those industries will fight tooth and nail against any attempt to tax them.

On the other hand I do wonder what happens if carbon taxes become a substantial proportion of government revenues. Then there could be a tension between raising revenue and reducing consumption.


Measuring the effect of any tax is difficult, especially if it is hypothetical or only existed for 2 years, but Australia’s experience suggests that carbon taxes work (ie. they reduce carbon emissions). The biggest taxpayers were aluminium smelters, and the resources industry isn’t that mobile. https://en.wikipedia.org/wiki/Carbon_pricing_in_Australia


The closest thing to a carbon tax is the current system of carbon emissions trading. Which has it's fair share of criticisms as well:

https://en.wikipedia.org/wiki/Carbon_emission_trading https://en.wikipedia.org/wiki/Carbon_emission_trading#Critic... https://en.wikipedia.org/wiki/Criticism_of_the_Kyoto_Protoco...

Carbon emissions trading does have an impact on carbon emissions, but it also detracts from the fundamental issue at hand - overreliance on fossil fuels in key industries and the need for a fundamental shift in our infrastructure in how energy is produced/consumed - while the costs, ultimately, get deferred elsewhere e.g. individual consumers.


You can apply such a tax in various ways. If the company resides in the US, directly tax the company. If they are importing, tax the imported goods.

The worst thing that could happen would be some 'world dictator' making universal rules because then large companies could lobby one entity to shift the rules in their favor, and against ours.


> The worst thing that could happen would be some 'world dictator' making universal rules

Surely the worst thing would be to set up a Prisoners Dilemma trap where individual countries have a huge incentive to betray all the other countries by abandoning this tax and attracting all the large companies in the world to come and pollute there.


I'm not particularly concerned about a prisoner dillemma trap.

If one country did that, the immediate response from all other countries could simply be 'stop all trade with that country' or simply 'crank up the import taxes from them' until they shape up.

You also don't need anywhere near 100% agreement for this to be effective. A large company losing just a few key markets (US, Germany, UK, blah) could massively outweigh any benefit they could imagine by trying to game such a system.


Just look at how much bs China is making the biggest corporations in the world jump through to be able to do commerce there. And what do the companies do - they adapt and grovel to get to that market. This is just one of those hyper-capitalist talking points that has never been proven true but keeps coming back up. If you do X then all the companies will leave. Like there are infinite other Chinas or Americas out there.


I like the elegance, but am growing to believe voters are simply unwilling to implement it. Mainly because "taxes" are eternally unpopular. It's possible that the best solution is actually the most implementable solution, rather than the most optimal solution.


The invisible hand is severely tied though.


> Banning personal vehicle diesel engines

Diesel is not worse than petrol:

Diesel cars tend to have lower volumetric fuel consumption figures than comparable gasoline vehicles. However, the benefit in terms of CO2 emissions is significantly lower, as the combustion of 1 liter of diesel fuel releases approximately 13% more CO2 than for the same amount of gasoline.


I believe the issue with diesel is NO2, basically it may emit less but it's worse for us

https://www.theengineer.co.uk/fact-check-are-diesel-cars-rea...


> ..it's worse for us

Is diesel CO2+NO2 is worse than petrol CO2+NO2 for global warming?


Potentially Diesel has less CO2 emissions than Petrol if that is the point you want to insist on.

The major issue with Diesel is NO2 emissions, on top of respiratory issues directly attributed to NO2 in city centres, NO2 is also a reducer of human longevity. [0]

I would say anything that is slowly killing us and reducing our lifespan should be pretty high on our priorities list.

[0] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6801524/?report...


> the combustion of 1 liter of diesel fuel releases approximately 13% more CO2 than for the same amount of gasoline

But with a liter of diesel (usually) you can make more kms than with a liter of gasoline. I'm not sure the CO2/km of each class of motor, though


imho both effects stem mostly from the fact that diesel has ~11% higher density than gasoline.

(ie. mileage and co2-output become more equal if measured against mass rather than volume)


Barring biases for the outlet itself for a moment, Vox did a pretty good video on this issue within the context of electricity consumption.

https://www.vox.com/2020/9/10/21430916/2020-presidential-ele...

Even policy makers struggle with this. It's very hard to make a comprehensive, understandable model that connects all the dots across the board. So, that's what this piece is about.

And here's the actual graph from the video:

http://energyliteracy.com/

The argument presented here isn't to reduce consumption - although, in absolute terms, that directly impacts carbon emissions - but to strategically replace fossil fuel sources for clean energy (solar, wind, water,...). It's an interesting perspective because it avoids turning the discussion about "consumption reduction" into a debate about token use cases such as "millions of web pages need to consume less energy."

To put it more succinctly, it's more interesting to consider the origin of the electricity coming out of the socket in a datacenter or housing then how it gets used by hardware plugged into those sockets.

I'll give you a for instance. Suppose you have to pick a host for your personal website and you're mindful about energy consumption. So, you're considering Digital Ocean: What type of energy is powering their datacenters? Turns out they don't really communicate about that, but intrepid users have figured it out (data februari 2020):

https://www.digitalocean.com/community/questions/what-kind-o...

So, if you choose NYC1 as your region when you pick a droplet, that's assumed to be powered by 100% wind energy.

Same with people who visit your website. Suppose, in some utopian way, 100% of your visitors have solar, batteries and are off the grid, then their daily visits to your website will have a reduced impact as well. Why reduced and not net-zero? Because the intermediate network infrastructure between NYC1 and, say, a visitor living in California, needs to be powered as well and there's no guarantee traffic won't be handled by fossil fuel powered network nodes at this point in time.


Oblique mention of Project Drawdown that tries to tackle such questions (albeit at a slightly more abstract level) methodically [1]

[1] https://drawdown.org/


Diesel cars have significantly lower carbon emissions than petrol cars and even than some electric car usage when accounting for the energy production. Diesels are even the best placed to run on biofuels.

Why single them out?


The issue with diesel engines is the fuel does not burn as cleanly in terms of particulate matter. Biodiesel and dinosaur diesel are both the same in this. For the last 15 years or so new diesel cars in Europe have been required to have a diesel particulate filter with the aim of reducing this.

Unlike a catalytic converter though, eventually (after 150,000km or so) they will become blocked up and cause a noticeable drop in power or cause engine fault codes. At that point you need to replace it, which could be a few thousand Euro for a new DPF, or the more common option is to remove it. This is illegal in most EU countries, but also a blind eye is turned to it - even in places with strict emissions checks like the UK.

AdBlue is a modern way of reducing this even more, but there are already devices you can buy that will trick the ECU into thinking your tank of AdBlue is full when its actually empty.

Combined with other common issues like injectors wearing out, as a diesel engine gets old it will burn fuel a lot dirtier than a similar aged petrol engine.


None of that has anything to do with carbon emissions, which do not increase with poor maintenance (unlike NOx or particulates). And they're all manageable issues, unlike the carbon emissions of petrol engines.


That's true, but diesel engines are only really less polluting in terms of CO2 due to using a lower amount of fuel consumed. If your goal is to reduce that, then as you say biofuels are the right answer.

However any mass adoption to biofuels would require different engine (existing engines will work fine on a low blend of biofuels, but very few will work on 10P%). For cars, why would you stick with a biodiesel engine which is more complicated and has higher levels of other pollutants, than some sort of biogasoline engine?


Engines running on biofuels equivalent to benzine are still significantly less efficient than diesels. They also require significant modifications, whereas diesels run on vegetable oils with little to no change.

Hemp oil powering diesels is possibly the most efficient locomotion path we have, only really competing with electricity generated with little carbon emissions.


The cost of things gives you a reasonable idea of the environmental impact. Energy intensive products and services have to pay for all that fuel.

This is why cities produce more CO2 than rural areas. Potentially it is more efficient to live in a city but city dwellers are richer and hence spend and consume more.

I went to a talk by the economist Jeffrey Sachs a few years ago where he said the sustainable level of spending around the world was about $10K USD PPP. Not much room for a Tesla in that budget.


I am also curious about this. I heard that something like one trans-Atlantic flight is worth 2 years of veganism. And that 10 or so freight ships produce as much pollution as the whole of Europe. These are vague statements, and the reality is certainly more nuanced, but it would be nice to have a sense for what the big issues are. For example: Would giving up coffee, with its links to deforestation, be tremendously beneficial or only marginally?


"And that 10 or so freight ships produce as much pollution as the whole of Europe."

This one is highly misleading. They may produce some very specific pollution more than entire Europe together, but pollution overall will be clearly lower.

Emissions of just C02 is about 4000 megatonnes in just EU ( https://en.wikipedia.org/wiki/List_of_countries_by_carbon_di... )

4000 / 10 / 365 = 1.1 megatone per day.

I am not expert on ships, but emitting 1 100 000 000 t of C02 per day seems unlikely.


As always, it's complex.

Most freight ships will burn marine fuels such a 'bunker fuel' when they are offshore not near ports, largely due to the health risk of increased PM in the air near ports.

The issue with fuels as unrefined as 'bunker fuel' (the thing is practically crude) is that they emmit a really high concentration of other gas other than CO2, namely SO2 and NO2.

> "SO2 shipping emissions are projected to increase and by 2020 exceed SO2 emissions from all land-based sources such as power plants in the EU, which over the past several decades have been reduced dramatically at great cost to industry." [0]

CO2 is obviously our major pollutant but Sulphur dioxide (SO2) is a major green-house gas contributor. The frustrating thing about bunker fuel is that it is used offshore purely because it is cheaper and there is no regulation curbing it. As with almost all things environmental related we go back to the hidden long-term costs of having something cheap in the short-term.

[0]https://www.transportenvironment.org/publications/sulphur-ma...


Bunker fuel is what's left after crude oil has had all the lighter fractions cracked off:

Small molecules like those in propane, naphtha, gasoline for cars, and jet fuel have relatively low boiling points, and they are removed at the start of the fractional distillation process. Heavier petroleum products like diesel fuel and lubricating oil are much less volatile and distill out more slowly, while bunker oil is literally the bottom of the barrel; in oil distilling, the only things denser than bunker fuel are carbon black feedstock and bituminous residue (asphalt), which is used for paving roads and sealing roofs.

https://en.wikipedia.org/wiki/Fuel_oil


> CO2 is obviously our major pollutant but Sulphur dioxide (SO2) is a major green-house gas contributor.

SO2 appears to actually have a negative greenhouse gas effect: https://www.carbonbrief.org/sulfur-emissions-may-have-slowed...


> SO2 appears to actually have a negative greenhouse gas effect

You make it sound more factual than it is, it's a computer model projection.

From the same paper you linked:

> "Although the new paper acknowledges the that the slow-down could be a result of natural variability in the climate system"

Which is currently the consensus agreement on this.


thought note that "Shipping emissions in total emit more SO2 that all power plants in EU" is drastically different than "10 largest ships pollute more than entire Europe"

And yes, something should be done with pollution generated by shipping industry. Though I wonder what else you can do with bunker fuel. Store it?


Yeah no estimate is available for this as of now.

But developers continue to write inefficient code even if other consequences are obvious:

* If using cloud, often inefficient software will lead to higher expenses than developer time.

* On mobile devices battery life is important

* On mobile networks bundle sizes matter


Heating, cooling, and transportation probably dominate your personal carbon footprint.


What about eating meat?


By removing meat more people would starve. Now that can be a good thing because fewer people means less energy consumption, however you still need to make that moral argument that starvation is an acceptable solution for reducing energy consumption.


I've missed something. If I stop eating meat then people will starve? Are you talking about the meat farmers?


I’m talking about that the society as a whole will produce less food if we all would go vegan.


It would be a big change for sure, but maybe less of a problem than you imagine:

https://ourworldindata.org/grapher/share-of-calories-from-an...

Also there's the fact that, per calorie, producing beef requires an order of magnitude more arable land than producing <insert-your-favorite-vegetable-here>, since cattle eat so much more than humans do.



Only a small percentage of US beef production is grass fed and worldwide grazing systems supply about 9 percent of the world's production of beef, the rest are crop fed in addition!

https://news.cornell.edu/stories/1997/08/us-could-feed-800-m...

https://iopscience.iop.org/article/10.1088/1748-9326/aad401



So you _do_ actually support the cessation of a large majority of meat production?


The real killer is beef. Simply replacing beef with almost anything else will have huge impacts (see page by FAO). If elimination is too much of an effort to make for our kids, doing it n% of the time will still bring n% improvements.

I might add that the generation of my parents (born in the 40's) ate meat once or twice a week, at least during the 40's and 50's, and they turned out fine.

http://www.fao.org/gleam/results/en/


Nutritional and greenhouse gas impacts of removing animals from US agriculture

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5715743/

In the simulated system with no animals, estimated agricultural GHG decreased (28%), but did not fully counterbalance the animal contribution of GHG (49% in this model). This assessment suggests that removing animals from US agriculture would reduce agricultural GHG emissions, but would also create a food supply incapable of supporting the US population’s nutritional requirements.

Assuming agricultural emissions account for 9% of total US emissions (47), and assuming that emission estimates here are representative of national emissions, eliminating animal agriculture would decrease total US emissions by an estimated 2.6 percentage units.


The thing is that soil used for grazing cattle can’t be used for planting vegetables efficiently.

There is a reason why we have different farming, because of different soil quality.

So the effect would be to reduce the area of where we can produce food.

And if you would remove cattle you no longer have natural fertilizer. Mineral fertilizer has a big environmental impact on ground water.


(This may be a good place for me to clear some misconceptions I have about farming; treat this comment as an application of Cunningham's Law.)

> The thing is that soil used for grazing cattle can’t be used for planting vegetables efficiently.

Not planting vegetables efficiently != not planting them at all, right? Could the lower yield on such fields still come ahead of lower energy efficiency of meat (in terms of energy expended per calorie of final human food produced)?

> So the effect would be to reduce the area of where we can produce food.

Surely we can grow something human-edible there. Or could perhaps this land become earmarked for construction, while equivalent amount of very fertile land could be switched from construction to farming? AFAIK there's plenty of settlements built on land that would be better used for farming.

> And if you would remove cattle you no longer have natural fertilizer.

Is industrialized agriculture even using natural fertilizer? I was under impression modern fertilizers are made in chemical plants and their production doesn't involve animal excrement.


If it is not efficient it will cost more than it yields, a loss. According to FAO 70% of worlds land surface is not suitable for planting crops.

Cattle can transform grass, that we can't eat, to protein that we need. It is actually a good thing, especially if you can't grow anything there.

In Sweden we have something called ecological farming, it is certification, to be approved for ecological farming you can't use mineral fertilizers anywhere in your food production.

Ecological products are usually somewhat more expensive in the store.

Now there are of course lots of farms that is not classified as ecological and they can use mineral fertilizers or natural fertilizers.

About a third of all fertilizers for farming used in Sweden is natural.


Thank you for the answers!

> If it is not efficient it will cost more than it yields, a loss.

I was thinking about less efficient, but still profitable. I presume it's not a binary, and farms aren't operating barely above EROI of 1.

> According to FAO 70% of worlds land surface is not suitable for planting crops.

That's... super surprising to me. I would have expected something closer to 50-40%. Perhaps it hinges on the definition of "suitability"? I'll look into those stats.

> About a third of all fertilizers for farming used in Sweden is natural.

That's also surprising to me. Is this number so large because there are so many ecological farms in Sweden, or natural fertilizer is just so popular?


Sure, it is perhaps possible for planting crops in areas that is less suitable, I guess that the current economic system we have in the West makes that not feasible. That is why I'm in favor of tariffs on imported goods.

With more being produced within your country you can legislate higher requirements on production methods. And when food becomes more expensive to buy, the incentive to have high quality production increases.

In the west we no longer have the problem of food shortage, thus we can afford somewhat higher food prices. And of course if you produce more within your country, you can get better salaries.

Why Sweden uses that much natural fertilizer I can't really tell.

But I found something about high prices on synthetic (mineral or others like natural gas) fertilizers. This was something that started happening globally around 2008. Between September 2007 and September 2008 prices increased with 80 percent globally.

If you understand Swedish, 2008

https://www2.jordbruksverket.se/webdav/files/SJV/trycksaker/...


You really think your restaurant and supermarket beef is coming from grazing? Those cattle live in dense feedlots, where they are fed corn and soy.


Where I live (Sweden), yes actually, but I do understand that US are somewhat crazy.

Isn't corn production massively subsidized in the US? So it becomes cheaper to feed cattle with corn instead of grazing. Madness.

That type of meat production is not something I support.


Did some googling. The US is the #2 beef exporter, and Sweden is not in the top 15. Admittedly that doesn't necessarily tell me about domestic consumption.

http://www.worldstopexports.com/top-beef-exporting-countries...

Interestingly, the #1 exporter, Australia, has historically used a mix of grazing and feed grains. But they're expecting to grow more feed grains because grazing suffers during droughts, which are increasingly common. Apparently those grains are wheat and barley; corn is definitely an American obsession. I assume that will be grown on land that could otherwise be used to grow food for humans.

https://www.beefcentral.com/lotfeeding/grain-sector-faces-ne...


> The thing is that soil used for grazing cattle can’t be used for planting vegetables efficiently.

This is true, but it's not how modern meat is produced. A lot of high-quality land is used to produce meat that could be used to produce vegan food, no?


I wouldn't be surprised, but do you have any statistics?


What you are missing is that a lot of land is used to grow feed for animals too.

Grazing systems supply about 9 percent of the world's production of beef, the rest are crop fed in addition!



And also don't forget to include Carbon emission emitted by natural event such as volcano eruptions


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: