Active waiting?

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Mar 23 11:53:22 UTC 2015


Nope, it waits for a signal, and python's implementation wakes up every few milliseconds. I would not see a way to work around that without risking infinite freezes.

S.
P.s. yes, it's clearly not optimal.

Am 23. März 2015 11:21:36 MEZ, schrieb Alvaro Gamez <alvaro.gamez at hazent.com>:
>Hi there
>
>I'm using offlineimap on a mobile device (Nokia N900) in IDLE mode to
>sync
>with gmail.
>Since I've started using it, I've noticed a significant drop in battery
>life.
>
>By using powertop and top, I've deduced that offlineimap, even though
>is
>waiting for the server to send out new emails via IDLE protocol, it's
>still
>consuming CPU
>
>Top causes for wakeups:
>Wakeups-from-idle in 10 seconds: 1314
>
>Top causes for wakeups:
>   2.6% (  500)       <interrupt> : DMA
>   1.6% (  308)       <interrupt> : gp timer
>   1.0% (  199)         python2.7 : schedule_hrtimeout_range
>(hrtimer_wakeup)
>
>I have no other python2.7 executable running, and when I stop
>offlineimap
>this line dissappears, so I am positive this wakeups are due to some
>sleep
>code inside offlineimap.
>
>Is there anything that can be done about this? Thanks! (I'm not
>subscribed
>to the list, so please keep me in CC).
>
>-- 
>Álvaro Gámez Machado
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>OfflineIMAP-project mailing list:
>OfflineIMAP-project at lists.alioth.debian.org
>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
>
>OfflineIMAP homepages:
>- https://github.com/OfflineIMAP
>- http://offlineimap.org

-- 
Sent from mobile phone. Please excuse brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/offlineimap-project/attachments/20150323/e1d31dbc/attachment-0001.html>


More information about the OfflineIMAP-project mailing list