Author Topic: Push is causing massive battery drain  (Read 13916 times)

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Push is causing massive battery drain
« Reply #15 on: May 03, 2017, 06:09:14 pm »
Re: I have around 15.000 unread mails (mostly spam) on the Hotmail account.

Please go into web mail and mark all old unread messages as read.

This will make Aqua's mail sync algorithms more efficient and should improve battery use somewhat.

Kostya,
1. Is this difference in syncing applicable/significant for IMAP Push only, or for scheduled IMAP sync too?
2. Does it matter if the unread messages are "beyond the time horizon"?

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Push is causing massive battery drain
« Reply #16 on: May 03, 2017, 06:27:43 pm »
Thanks for the explaination, but which operation could that be on the Gmail-Account at 9:10? The Gmail and the Hotmail are Push only and  there was no new mail at 9:10 on the Gmail. Is there something like "checking mails" even on Push? I always thought Push is only server sided and the client is only listening/waiting without any active checking.

Under settings / network there is an option for "Push mail - keep alive". Maybe the shown time under the account name has something to do with that? (new packet for keep alive sended?)

A few thoughts on that:
1. My understanding is that depending on the server, "Push" may require regular re-establishment of that connection. (I believe "keep-alive" is helping to assure the connection is not lost for that reason.)
2. Moreover,  I don't know if Gmail servers have some time limit for the "IDLE" connection being open. They might, - to enforce effective load balancing.
3. Also, IDLE assumes a sustained open TCP connection. as far as I know, it will not survive roaming, i.e. when your device moves to a different network and obtains a new IP address, that connection has to be re-opened.
4. Occasionally the IMAP server can be rebooted momentarily (e.g. to replace the SSL certificates on the server, which Gmail does weekly or biweekly now), in which case the connection has to be re-established.

All those events (I am not 100% sure about #1) will be activities that are likely to trigger Aquamail to show the last activity time.

BTW, as recommended by the developer, even with PUSH, you do want to keep scheduled sync enabled (say at every 30 minutes). That will ensure you will not miss any messages.

HTH.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Push is causing massive battery drain
« Reply #17 on: May 03, 2017, 07:46:37 pm »
Re: 1. Is this difference in syncing applicable/significant for IMAP Push only, or for scheduled IMAP sync too?

Both - part of Aqua's IMAP sync algorithm is to ask the server to the full list of unread message ID's.

The ID's are small (numeric), but still. Time and traffic.

Re: 2. Does it matter if the unread messages are "beyond the time horizon"?

It does matter either way.

Re: 1. My understanding is that depending on the server, "Push" may require regular re-establishment of that connection. (I believe "keep-alive" is helping to assure the connection is not lost for that reason.)

Yes, IMAP IDLE requires a persistent network connection to the server, one per folder.

If one of the accounts (used by the OP) is Hotmail - then I recommend removing this account from the app and adding it back in as Exchange type.

Reason: Hotmail's IMAP is running extremely slow right now. This affects both scheduled checks and push (IMAP IDLE).

Their EWS (Exchange) implementation appears to be fine, only IMAP is messed up.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

openyoureyes

  • Newbie
  • *
  • Posts: 11
Re: Push is causing massive battery drain
« Reply #18 on: May 04, 2017, 04:27:08 pm »
If one of the accounts (used by the OP) is Hotmail - then I recommend removing this account from the app and adding it back in as Exchange type.

Reason: Hotmail's IMAP is running extremely slow right now. This affects both scheduled checks and push (IMAP IDLE).

Their EWS (Exchange) implementation appears to be fine, only IMAP is messed up.

I already did that and battery usage is very nice now (see above).

I was somewhat surprised that the time stamp under each Push-Account (Hotmail and Gmail) is much more often updating than I get emails. Thats the reason for the latest discussion above.

The other thing is that my Business-Exchange-Account isn't working with Push - it says something like "it seems that your server is blocking push".


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Push is causing massive battery drain
« Reply #19 on: May 04, 2017, 10:26:07 pm »
Quote
I was somewhat surprised that the time stamp under each Push-Account (Hotmail and Gmail) is much more often updating than I get emails. Thats the reason for the latest discussion above.

Since you're using push, it "catches up" every time you mark a message read (let's say) in another mail app or web mail.

Quote
The other thing is that my Business-Exchange-Account isn't working with Push - it says something like "it seems that your server is blocking push".

Yes this does happen for a small %% of users -- the particular push technology used by Aqua Mail is sometimes blocked "for security reasons" by the people managing your corporate Exchange server.

The thing it uses is:

"EWS Push Notifications"

https://msdn.microsoft.com/library/office/dn458791(v=exchg.150).aspx

which "point to":

https://push-ews.aqua-mail.com <some URL here>

It's possible that your "computer people" only allow these "push notifications" inside your corporate network and not "outside".


Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/