by croes · 2y ago · 0 comments
I'd wager CSS is never the bottleneck. I've never once seen it be a performance issue, personally. Browsers are really really fast at rendering the DOM and styling it, especially if you only need to do it once at page load.
Even modern CSS isn't really that complex compared a hundred page Indesign file, for example. Computers and phones can handle it just fine.
If websites feel slow, IME it's usually ads/analytics, slow AJAX and backends, or scripting bottlenecks, loops, unnecessary redraws, efc. Not really basic DOM draws from CSS.
If we're worried about electricity (and we should be), we should focus on renewables and storage and nuclear, not cell phone usage. It's trivial and totally dwarfed by desktops, TVs, HVAC, light bulbs, cars, just about everything.
But that's not what I mean. It's the sum of all the small parts (not just CSS functions that are offloaded to the client) that, taken individually, all consume only a very, very small amount of energy but are at the same time easily avoidable or without real benefit.
Software and IT are full of these, and the total amount of energy wasted is enormous. But every single developer thinks that in comparison, it's practically nothing.
And this is different from any other environment... how?