There are multiple applications available to do a single task. To do a single task, those apps consumes lots of battery and developers yet haven’t had a way to know when and how to make their apps more energy-efficient.

Now, Purdue University scientists have found a solution. They have developed a tool dubbed ‘DiffProf’ that uses AI to automatically decide for the developer if a feature should be improved to drain less battery and how to make that improvement.

Y. Charlie Hu, the Michael and Katherine Birck Professor of Electrical and Computer Engineering said, “What if a feature of an app needs to consume 70 percent of the phone’s battery? Is there room for improvement, or should that feature be left the way it is?”

In 2012, Hu’s lab was the first to develop a tool for developers to identify hot spots in the source code that are responsible for an app’s battery drain.

Hu said, “Before this point, trying to figure out how much battery an app is draining was like looking at a black box. It was a big step forward, but it still isn’t enough, because developers often wouldn’t know what to do with information about the source of a battery drain.”

How code runs can dramatically differ between two apps, even if the developers are implementing the same task. DiffProf catches these differences in the “call trees” of similar tasks, to show why the messaging feature of one messaging app consumes more energy than another messaging app. DiffProf then reveals how to rewrite the app to drain less battery.

Abhilash Jindal, fellow co-founder of Mobile Enerlytics said, “Ultimately, in order for this technique to make a big difference for an entire smartphone, all developers would need to make their apps more energy-efficient.”

“The impact also depends on how intensively someone uses certain apps. Someone who uses messaging apps a lot might experience longer battery life, but someone who doesn’t use their messaging apps at all might not.”

So far, the DiffProf prototype has only been tested for the Android mobile operating system.

The work was supported in part by the National Science Foundation.

The tool, which was announced on Oct. 8 at the 13th USENIX Symposium on Operating Systems Design and Implementation, aligns with Purdue’s Giant Leaps celebration, acknowledging the university’s global advancements made in AI, algorithms and automation as part of Purdue’s 150th anniversary. This is one of the four themes of the yearlong celebration’s Ideas Festival, designed to showcase Purdue as an intellectual center solving real-world issues.