Rethinking Environmental Impact in Web Development
Most conversations about software efficiency end up talking about CPU time, memory usage or more recently CO2 emissions. But none of these measures feel intuitive for everyday developers.
So in a recent research project I published on Zenodo, I started with a simple idea: >
What if we measured software not in CO₂, but in trees?
How many trees would be needed to absorb the CO2 produced by running your next "Hello World" app?This idea will become the second part of my research. But before we can measure anything in tree-equivalents, we first need a way to measure the architectural complexity of software itself. And that is exactly what Part 1 of the research delivers.
Part 1: Measuring Accidental Complexity (ACL / ACS)
The first published part of this research focuses on something developers feel every day: accidental complexity. But what exactly is accidental complexity? Introduced in a paper titled "No Silver Bullet: Essence and Accidents of Software Engineering" in 1987 by Fredrick Brooks, accidental complexity is the difficulty introduced by the tools, languages, and methodologies used for implementation. Whereas essential complexity is the difficulty of the problem e.g., the complex business logic of a financial system.
To study this, I created a simple profiling tool, CESP: Code Execution & Structure Profiler for PHP (Davanzo, 2025a) and ran a minimal "Hello World" in six popular PHP frameworks. The goal was to see:
- how many internal components each framework loads,
- how much memory it consumes,
- and how long it takes to run something trivial.
From that, I introduced a simple metric: Accidental Complexity Score (ACS) A way to quantify how much "architecture" a framework forces on you, even before your real logic begins. Some frameworks turned out to be extremely lightweight. Others required hundreds of classes and functions just to print "Hello World". Unsurprisingly, the heavier frameworks used more memory and took longer to run. This first part of the research is now complete and published.
All the classes, interfaces, traits, functions and files a framework forces you to load before your application even does anything meaningful.The full article is available in Zenodo Quantifying Architectural Complexity in Modern PHP Frameworks
Part 2: Tree-Equivalent Complexity (Coming Soon)
Now that we can measure accidental complexity in a reproducible way, we can finally move to the more intuitive part of the project: translating those measurements into something people can understand: trees. The goal is not to shame developers or frameworks, but to offer a clearer way to visualise and compare the real-world footprint of software. Because most people cannot picture CO2 produced by an, apparently simple, web application accessed one million times a day. but everyone can figure out that we need x number of trees to compensate their carbon footprint.
Why I am doing this?
Software may be virtual but the machines running it are very real. Every layer of abstraction, every unused component, and every computer language and every over-engineered framework eventually turns into energy consumption, therefore CO2. By shifting the conversation to tree-equivalents, we make technical decisions easier to understand for:
- developers
- Chief Technology Officers
- project managers
- and even non-technical stakeholders
It becomes a universal language.
References
Davanzo, A. (2025a) ‘CESP: Code Execution & Structure Profiler for PHP’, Zenodo [Preprint]. Available at: https://doi.org/10.5281/zenodo.17688740.
Davanzo, A. (2025) ‘Quantifying Architectural Complexity in Modern PHP Frameworks’, Zenodo [Preprint]. Available at: https://doi.org/10.5281/zenodo.17690400.