Do real time updates drain mobile battery faster?


(Brad Huber) #1

Is there any way that the real-time updating using the message bus polling could be draining the battery more quickly on mobile phones, due to frequent access to the wireless network?

And if so, is there any way we could maybe get an option to turn it off and replace it with some kind of “Pull down to refresh” mechanism?


Real-time updates
(Sam Saffron) #2

Very unlikely, most mobile browsers halt traffic once your browser is in the background. Message bus moves to a ping a minute once browsers are in the background for desktop.


(Brad Huber) #3

Thanks for the reply!


(Jeff Atwood) #4

No, but our heavy use of JavaScript will be noticeable on the battery at least initially – remember Discourse is literally a JavaScript application, it does not retrieve and render HTML at all. It uses JavaScript to repaint the screen every time you click on something.

The closest analog is an app from the iOS app store which runs native code, except instead of native code we are JavaScript code. The other analogs apply, once the “app” is in your browser cache, it barely uses any network bandwidth at all. But spinning it up the first time will be just as expensive as installing a new iOS app from scratch, downloading it from the app store, etcetera.


(Rikki Tooley) #5

I definitely notice increased battery drain on my (Windows) phone if I leave a Discourse tab open in the background, I don’t have any concrete data though.