DEV Community

Discussion on: The Tab Advantage

Collapse
 
cyrez profile image
Cyril Reze

Indeed, you are right, for local and individual use, it has little impact!

But on a global scale, it’s something else and each individual action is important!

Let's take a concrete example: Worpress.

The current version 6.4.3 has 1,385,052 indentations using tabs.
The total uncompressed weight is 69.7 MB

If we replace all tabs with 4 spaces, then we get 1,385,052 * (4 - 1) = 3,975,156 bytes
WordPress is therefore 4 MB lighter by using tabs instead of 4 spaces per installation of this CMS.

With more than 40 million WordPress sites, we can estimate the overall gain at 152 TB.
That's huge!

It would be interesting to know how much 152 TB costs in energy and carbon footprint.

Collapse
 
moopet profile image
Ben Sinclair

The key word there is "uncompressed" :) Nothing is regularly sent over the wire in that format - and once the wordpress zip file is unpacked, 99% of those files will sit there doing nothing anyway.

Still, you're right - if everyone optimised everything they could, the world would be a better place!