On Tue, Jun 30, 2015 at 3:04 PM, Fabrice Desré <[email protected]> wrote: > On 06/30/2015 02:50 PM, Jonas Sicking wrote: >> Definitely use RequestSync rather than alarm API! There are battery >> saving advantages already, and these advantages will just get better >> in the future as we improve the implementation of the API. > > Are you sure about the battery savings? Last I look requestSync was > using gecko timers while the alarm api is doing a blocking read from a > kernel managed file descriptor on its own thread. I would be surprised > if there was any significant difference.
The difference is that the requestSync API won't wake the app up if the user doesn't have a network connection. So it has potential to save a lot of application wakeups if the user is offline for a while. / Jonas _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
