[whatwg] HTML extension for system idle detection.

On Mon, Sep 14, 2009 at 10:41 AM, David Bennett<ddt at google.com> wrote:
> I also don't see
> why, in your particular case, you couldn't make it so that all background
> tasks are 'idle'.

We could, but the reason we stop scripts is so that the pages don't
kill our battery life. If we sent an idle signal and the page decided
to do something expensive, how would that help?

Suppose we send an idle message to a page as it goes to the background
and give it a 30s window before we terminate it. Your window needs 35s
to complete its expensive task. You come back to me and say that my
idle notification behavior is broken, because i didn't let you finish
your task (draining my battery).

We're currently getting complaints from our cellular stack people
about each network connection which causes the radio to have to power
up and down (in fact, they complain that there are two hits or maybe
three: "initial request", "initial response",  and "remote closed
connection"). If we tell pages each time they go to the background
using your proposed idle "notification", the scripts will spend power
waking up the radio and then the cellular people will complain even
more.

Since the reason we stop scripts is to save battery, adding another
chance for scripts to drain the battery (by waking up the radio) is
counter productive at best.

Received on Tuesday, 15 September 2009 07:04:01 UTC