The battery performance with WebSocket is abysmal. Turns my 2~3days of standby time to roughly 10h. I expect some hit, obviously, but this is pretty extreme. Maybe it would be possible to allow tweaking the polling time to reduce battery?
What device are you using and what version of Android?
Nexus 5X on Nougat
i haven't tested it myself, but I have read that Conversations managed to implement push notifications on Android for XMPP in a battery efficient way without GCM. You may want to look at how Zom/ChatSecure are doing it too.
I appreciate that the Wire team understands the importance of running Wire without GApps.
I have been using wire for a while now without GAPPS and on the first day the battery drain was really high, but then somehow it got completely normal. I still have LibreSignal running which also maintains a websocket connection and according to android it drains more battery than Wire.
Battery consumption seems excessive when compare to other apps. Does telegram use Google Services?

I have been using wire for a while now without GAPPS and on the first day the battery drain was really high, but then somehow it got completely normal. I still have LibreSignal running which also maintains a websocket connection and according to android it drains more battery than Wire.
After some more time using WireApp, I have to say that power usage varies strongly between "not significant" to "more than everything else combined". I have yet to see a pattern, not moving at all seems to always result in low battery usage, but moving for a lot of movement it can be both low and high.
I have also experienced rare loss of updates where apparently something went wrong with the websockets.
Here an example of where wire really, drained the battery:

Note that it "only" says 10%, however on-rime was reduced from over 24h to roughly 6-7h. After I killed the wire app, everything went back to normal.
After some more time using WireApp, I have to say that power usage varies strongly between "not significant" to "more than everything else combined". I have yet to see a pattern, not moving at all seems to always result in low battery usage, but moving for a lot of movement it can be both low and high.
I have noticed this too. Occasionally, Wire is a big battery drain, but most of the time it is not. I have not noticed a pattern either.
+1
I'm also seeing unexpected battery usage from Wire on Android.
Signal now has websocket support officially and it also has a background deamon to re-establish connection in case something with the web-sockets goes wrong (telco times out connection earlier than they should).
It works really well and has no negative impact on my battery at all. Can you maybe have a look at how they do it?
Actually they do have problems too (https://github.com/WhisperSystems/Signal-Android/issues/1298). Since it very much depends on the phone, I don't know if looking at their implementation will help (though it could). You may just be lucky to have it work well for you, while other people may find Wire to have a lower impact on their battery. I guess it depends. ^^
@someoneEsle that's before 3.30.0, they have changed stuff for the most recent release.
I'm using latest WIRE version on Android, with a HTC 10 and Android 7.1.2 without gapps or any Google services tho! The Battery drain is massive and not normal or acceptable at all. I will deinstall this app until this is fixed. This app drains almost my entire battery life over one day, just alone, it is ridiculous.
I love WIRE and how the devs do work on it and keep it running and improving. But this has to be handled with priority imho.
Edit: I need to add, that Telegram does not have such battery issued at all, also Conversations.im XMPP app does not too. In fact, no other app drains that much battery like wire does currently. And I do not use google play services/GCM at all, on my device, so they all run without GCM actually.

Turns out this appears to be a bug only affecting the never versions. Had an old version (2.28.317) running without any battery issues, Updated to the newest version (2.33.336) after talking to someone who was complaining about high power drainage. Both of us run google-free androids.
Pictures: Before and after update.


I am having excessive battery drain as well. No google services and Wire is consuming upwards of 60% of my phones battery. Running Nexus 6 (shamu) with 7.1.2
Any experiences with MicroG? I use this free GApps replacement, and Wire registers with it and receives messages with it (according to MicroG settings).
However, Wire is constantly running in the background (at least at 1% cpu usage in task monitors, even if nothing is happening, and all other apps are at 0). Consequently, Wire is always relatively high in my battery stats (with a very casual usage of a zero to a few messages a day, it contends with Firefox in terms of battery usage, which somhow does not fit together).
So, does Wire somehow not recognize that it can use MicroG and does alternative polling instead!?
I know this issue is about battery performance if WebSocket is used – in contrast to the default case of using GCM which should be the case if Google Play Services or microG is installed. But there are now some comments that the issue started with one of the recent Wire updates and that it was fine before – which is also the case for me.
Is it correct that all of us having the problem only recently have actually _Google Play Services_ or _microG_ installed? In this case we should maybe discuss this in issue #853 that is not specifically about WebSocket.
_However I could resolve the problem for microG and for another device with preinstalled Google Play Services (but without a Google account, so no automatic updates) by manually updating them!_
For more details on this see my comment in #853.
My speculation about the problem with the recent update is: The new Wire update relies on a newer GCM version and if this is not found, Wire does not raise a warning but _silently_ falls back to WebSocket. Thus the GCM users now experience the same battery drain as the WebSocket users; so issue #853 would still be related to this WebSocket issue.
Might it be related to #853 ?
@Awerick No, I'm using a google-free phone. So this effects WebSocket and GCM likewise since recent versions.
Please read my comment here: https://github.com/wireapp/wire-android/issues/853#issuecomment-320602500. Some updates/fixes on this are coming soon.
Also, I should close this issue and keep all the battery-related discussions in the other thread (#853). Thanks everyone for your feedback!
Most helpful comment
i haven't tested it myself, but I have read that Conversations managed to implement push notifications on Android for XMPP in a battery efficient way without GCM. You may want to look at how Zom/ChatSecure are doing it too.
I appreciate that the Wire team understands the importance of running Wire without GApps.