Context:As the use of mobile devices has increased immensely through the years, the presence of analytics and advertisements on web and native applications has become prevalent. However, serving ads and analytics comes with costs, as they are associated with additional code and network requests to execute properly. Subsequently, more computing resources are used, having an impact on the energy consumption and the performance of web applications. Previous work has focused only on native Android applications, has used different metrics for performance, or has focused on other aspects of web applications. Goal:This paper aims to investigate the costs of including advertisements and analytics in web applications. This is done in terms of energy consumption and performance. For energy, the consumption is measured in Joules. For performance, the following metrics are used: first contentful paint and full page load time. The results of this study could influence the decisions of web developers and web browser vendors related to ads and analytics usage, while providing the foundation for further research on this topic. Method:To collect reliable and population-representative results, the research focused on 9 popular web applications included in the Tranco list. Energy consumption and performance metrics were gathered for 3 versions of each web application — original version with ads and analytics, without ads, and without analytics. A cross-over paired comparison design is conducted. Multiple executions of each run were performed in random order to ascertain rigorous measures. The experiment is carried out on an Android tablet using two browsers, Google Chrome and Opera. Results:Ads significantly impact the energy consumption of mobile web apps for both browsers, with a large effect size; analytics have a significant impact on the energy consumption of Chrome (with a medium effect size), but not on Opera. In terms of performance, both ads and analytics do not significantly impact the first contentful paint metric on both browsers; differently, both ads and analytics significantly impact the full page load time of the mobile web apps on both browsers, but with a small effect size. Conclusions:This study provides evidence that both ads and analytics can have a significant impact on the energy consumption and performance of mobile web apps loaded either on Opera or Chrome. Depending on the requirements of the mobile web app, it is advisable to limit both ads and analytics in a mobile web app in order to reduce its energy consumption and improve its full page load time. Special attention should be paid to the presence of ads since they resulted to be the most impactful in terms of energy consumption.
Read full abstract