Building energy efficiency testing into programme development

Ever wondered how much energy iconsumed when using your device to update your favourite social media platform? If your application is connected to the cloud then it could be constantly sending and receiving data.

All of this costs energy, along with every time a user likes or dislkes a post...  

In a world where people are looking to reduce their carbon footprint, it’s still not fully understood how much digital technology contributes to CO2 emissions. Whether our mobile phones or laptops are plugged in or not, technology is needed to power them up just like electric cars and other rechargeable appliancesThe energy has to come from somewhere, and if it ultimately comes from non-renewable resources or if you require so much of it that you suddenly have to fire up two new coal power stations, then it's pointless. 

It is also found that without dramatic increases in efficiency, the ICT industry could use 20% of all electricity and emit up to 5.5% of the world’s carbon emissions by 2025 (from A. S. Andrae, “Total consumer power consumption forecast,” gehalten auf der Nordic Digital Business SummitHelsinki, Finland, 2017) 

How do we know when a device is consuming energy? 

You might have noticed how sometimes you can pick up your mobile phone and it feels hot to touch. This is usually because something in the background is running (even when it appears to have closed). This ‘bug’ can consume power and if ignored can drain your battery very quicklyThe faster a mobile phone battery runs out, the more it will need to be charged. Multiply this by a billion mobile phones around the world and suddenly you've got a huge increase in electricity demand and usage.  

There are ways we can see how much battery consumption certain apps are using on our phones, and this is a fairly new concept. However there is not yet a way for developers to test the energy efficiency of their applications when developing them.

"If applications are going to drain battery life, this is something the developer should be aware of and work towards optimising for the benefit of the user - ultimately helping to lower carbon emissions worldwide."

 When building new applications, it is common for software developers to invest time in debugging programmes and refining features to better appeal to users. However, it is less common for them to consider energy efficiency when designing their code. 

Dr Anandha Gopalan and students at Imperial College London’s Department of Computing have been developing software that enables developers to determine how much energy their applications consume when they are open, connected to the Wi-Fi, or sat idle in the background. By integrating this into integrated development environments (IDEs), we can autocomplete functions - a bit like how predictive text works on a mobile phone algorithms can tell developers hey, I notice you are using this function, but why don't you use this other function which does something similar, but it's actually more energy efficient? 

The goal of this research is to bring energy into the conversation, and make it as easy and natural for developers as debugging. “If you find a bug that prevents you from having good quality code, the good quality code should be energy efficient too. There may be a trade-off between energy efficiency and software engineering principles going forward, but there is always a compromise to be made when innovating.”  

This idea is still very much in its research phase, but it is a concept that could become standard in the future of programme development. It could not only improve overall energy efficiency, but enable the general public to make informed choices about which apps they would like to install on their phones, for example. 

What could we expect in the future? 

An extension of this research would be to benchmark applications exactly like you would benchmark your appliances at home, awarding apps and programmes energy ratings similar to the ratings you take into consideration when buying a new freezer or cooker.  

"Wouldn’t it be wonderful to scroll through apps and view not only the customer rating before purchasing, but also an energy rating to know that this app isn’t going to drain your battery or pull on external resources via the cloud?"