So you want to save energy? Ditch web apps and go native, boffins say
Take up less CPU time and memory? What amazing tech is this?!
Eggheads at Vrije Universiteit (VU) in the Netherlands recommend that people with Android devices use native apps rather than web apps when viewing popular sites like ESPN, Pinterest, Spotify, and YouTube because native apps are more energy efficient.
That may seem obvious to some but you know what they say: the difference between science and screwing around is writing it down.
In a preprint paper titled, "Native vs Web Apps: Comparing the Energy Consumption and Performance of Android Apps and their Web Counterparts," computer scientists Ruben Horn, Abdellah Lahnaoui, Edgardo Reinoso, Sicheng Peng, Vadim Isakov, Tanjina Islam, and Ivano Malavolta analyze the energy usage of 10 internet content platforms that offer access through both native Android apps and the web.
The researchers looked at ESPN, The Weather Channel, LinkedIn, Pinterest, Coupang, Shopee, SoundCloud, Spotify, Twitch, and YouTube. They compared the native Android apps and web apps for each of these in terms of energy consumption, network traffic volume, CPU load, memory load, and time between video frame loads.
And they found that native apps use less energy, as can be seen from these mean values:
- Energy (joules):
- Native: 371.1275
- Web: 567.4365
- Network traffic (bytes):
- Native: 39,422,545
- Web: 21,956,270
- CPU utilization (percentage):
- Native: 24.22059
- Web: 35.89417
- Memory load (kB):
- Native: 238,682.8
- Web: 1,756,048
- Frame time (ns):
- Native: 12,205,412
- Web: 13,691,591
While web apps use more energy than native apps, they also send and receive less network traffic. The researchers posit this may be a consequence of web devs being incentivized to reduce bandwidth usage because web apps often have to be reloaded on startup.
They also note the substantial difference in mean memory load, with web apps demanding just over 1.5 GB more memory than their native counterparts.
"A possible explanation for the memory overhead could be the fact that Web apps run on top of the Google Chrome browser app," they observe. "Since the memory footprint of the browser contributes to the measurements, it is plausible that the measurements for the Web apps are higher than those of the native versions."
- Telegram criticizes Apple for 'intentionally crippling' web app features on iOS
- Microsoft rethinks death sentence for Windows Mail and Calendar apps
- Millions of people's data stolen because web devs forget to check access perms
- Veilid: A secure peer-to-peer network for apps that flips off the surveillance economy
They chose to look only at the Chrome browser because it has the highest market share. A 2022 study [PDF] by a different set of academics found Chrome on Android to be "the greenest browser" for playing videos on Vimeo and browsing Facebook, but surprisingly not for Google Search.
"Based on our results, we advise users to access internet content using native apps over Web apps, when possible to optimize the battery life of their devices," the boffins state in their paper.
They say that while it may not be realistic to expect that developers will choose between native and web apps solely on the basis of energy consumption and performance, web apps should serve mainly for user acquisition and not platform interaction.
The paper cites various possible threats to validity like caching behavior (loading assets from a local cache and thus not over the network), which they say they dealt with by clearing native app caches on every test run, and ads, which they (mostly) blocked at a network level using AdGuard DNS.
Missing from the paper entirely is the word "privacy," which The Register inquired about but received no immediate response from the researchers.
In the absence of network-level blocking of ad and tracking scripts, web apps have the potential to offer more privacy and best customizability than their native counterparts, at least in Android browsers like Firefox or Kiwi that support privacy-enhancing extensions. ®