Bloated Code May Drain Your Smartphone Battery
At the 2012 World Wide Web Conference, Stanford University researchers have presented a means for measuring the energy consumption of wasteful code from websites, and have found that popular sites like Wikipedia and Apple have not optimized their code for mobile browsing. By attaching a multimeter between an Android phone and its battery, Narendran Thiagarajan and others were able to measure nearly instantaneous power consumption while the phone was in use.
The energy consumption, measured in Joules or as a percent of battery life, showed large differences between energy-efficient homepages like Baidu, Gmail, and the Wall Street Journal, (about 12 Joules) against Tumblr and Wikipedia (about 35 Joules). Apple’s homepage had the highest energy consumption measured, at 45 Joules, or about 1.4% of battery life.
These measurements were compared to energy consumption when the browser was idle, and accounted for differences in web server performance by placing copies of the respective home pages on a single Apache remote server. Measurements were made using a 3G network. Separate measurements of the energy used to render each page were made by forcing the browser to use the local cache.
While energy efficiency has been used for desktop computers and servers, the authors present findings that could have practical applications for mobile browsing. By designing mobile sites that take energy consumption into account, smartphone users may benefit from longer battery life.