Should energy consumption influence the choice of Android third-party HTTP libraries?Technical Papers
In mobile devices, the battery is a limited resource and mobile apps are designed with this constraint in mind. To speed up development, app developers often use third-party libraries. Researchers have found that third-party libraries for ads and billing excessively use mobile resources. Other often used third-party libraries such as Android third-party HTTP libraries have received less attention from research regarding energy consumption. To fill this gap, we investigated whether popular Android third-party HTTP libraries vary in energy consumption. In addition, we checked whether there is a correlation between performance and energy consumption. To achieve this goal, we performed a controlled experiment. We created 45 different versions of a custom app and explored the energy consumption and performance of eight popular Android third-party HTTP libraries in five typical use cases. We found that there is a significant variance of energy consumption between the selected Android third-party HTTP libraries. The energy drivers are related to the internal structure of the Android third-party HTTP libraries, in particular with the handling of asynchronous tasks and the creation of multiple threads in the background. We did not find significant correlation between performance and energy consumption in most of the versions. Our results will help app developers make better choices when selecting Android third-party HTTP libraries. Future studies investigating the interdependencies between performance, malware detection, maintenance, energy efficiency and other quality dimensions of Android app code could also benefit from our results.