So you want to save energy? Ditch web apps and go native, boffins say
- Reference: 1693823469
- News link: https://www.theregister.co.uk/2023/09/04/web_native_apps/
- Source link:
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 [1]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.
[2]
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.
[3]
[4]
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."
[5]Telegram criticizes Apple for 'intentionally crippling' web app features on iOS
[6]Microsoft rethinks death sentence for Windows Mail and Calendar apps
[7]Millions of people's data stolen because web devs forget to check access perms
[8]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 [9]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.
[10]
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.
[11]
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. ®
Get our [12]Tech Resources
[1] https://arxiv.org/abs/2308.16734
[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2ZPX-JBIqrvBbRSrG233rmAAAABc&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44ZPX-JBIqrvBbRSrG233rmAAAABc&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33ZPX-JBIqrvBbRSrG233rmAAAABc&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[5] https://www.theregister.com/2022/06/14/telegram_safari/
[6] https://www.theregister.com/2023/06/20/microsoft_calendar_mail_outlook/
[7] https://www.theregister.com/2023/07/29/cisa_nsa_idor_australia/
[8] https://www.theregister.com/2023/08/12/veilid_privacy_data/
[9] https://arxiv.org/pdf/2205.11399.pdf
[10] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44ZPX-JBIqrvBbRSrG233rmAAAABc&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[11] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33ZPX-JBIqrvBbRSrG233rmAAAABc&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[12] https://whitepapers.theregister.com/
Stating the bleeding obvious
"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.
Well, duh! Being a simple engineer, this should be another kick in the cloudybollocks. So iwant to move a pic from an iPhone to a PC. iHave to power up the radio, send the pic to Apple, then send it back instead of just copying it across to PC via USB or WiFi.
So they're saying if we want to run apps on smutphones or laptops, we should run them locally and save on network, transmission and remote processing energy costs? Who knew? If only we could..
Re: Stating the bleeding obvious
"So iwant to move a pic from an iPhone to a PC. iHave to power up the radio, send the pic to Apple, then send it back instead of just copying it across to PC via USB or WiFi."
I setup an small webserver in my local network and then upload from iPhone to PC, no Apple / international routes involved. OpenBSD + httpd + PHP. Or Linux + Apache + PHP.
Re: Stating the bleeding obvious
I setup an small webserver in my local network and then upload from iPhone to PC, no Apple / international routes involved. OpenBSD + httpd + PHP. Or Linux + Apache + PHP.
Yep, but still needlessly complicated. Decades ago, that could be done with just by crossing pins 2 & 3, and 7 straight through. For simple tasks like that, no servers are needed, which is also true for a lot of stuff that enforces cloud dependencies.
Re: Stating the bleeding obvious
With the exception of the old iPad (too proprietary) and RISC OS (too ancient), I usually just toss files around using Bluetooth. It's slow but fairly trouble free. Even the XP box can get in on the act.
I don't understand the problem. I just the USB 3 connection on my phone, connect it to the PC, and file browse for I what I want.
But I have a Samsung. It just works.
But the web browser size/load is shared amongst all the sites, where as each app is it's own size/load. They seem to have missed this point.
Difference between science and screwing
The difference between science and screwing that it not just the mean published, but the variance as well.
The sampling not specific but random.
Interesting, web app uses twice less network traffic. What if someone smart would calcualte how much energy savings this brings not just on a single mobile device, but across the entire data path: starting from 4G/5G base station and then up through all the routers/switches etc...
"Twice less"??? When did "half as much" become redundant? I'm downvoting for that.
(grumpy old man grumbling)
Pretty much when "existing" was replaced with "extant". You see that word everywhere now, especially when people want to seem educated. I fail to see what's wrong with existing. Especially since you can say that it existed at one point, but no more. How do you that with extant ? It exted ?
Bollocks.
Get off my lawn !
Re: web devs being incentivized to reduce bandwidth usage
Web apps not having access to as many slurpable parts of the phone sounds more like it.
Htmx
This will make web apps light and yet feel like mobile apps .
It’s really taking off and so simple
Privacy
I fail to see how a web app is globally more privacy-conscious than a native one. Facebook is going to screw you whatever you use. If El Reg had a native app, I doubt that it would be so impolite.
Know who you're working with. How you do so is less of an issue.
Web versions are designed to run badly. They want you to use their app because they can track you and spam you with ads. Why would they make it easier to use a web browser with an ad blocker?
LinkedIn is a good example. It's barely usable in a browser, and uses a huge amount of resources, on a mobile or desktop device. In the app it runs better but you can't turn off the annoying video posts.
Then again, YouTube runs fine and has no ads.
A lot of apps are just front ends to web pages anyway.