RE: solving the CPU usage issue for non-visible pages

[hoping that quoting works better this time]

On Oct 20, 2009, at 7:41 PM, Maciej Stachowiak wrote:
> On Oct 20, 2009, at 7:13 PM, Ennals, Robert wrote:
[snip]
> > I'd even be tempted to risk breaking existing applications a little bit and make the
> > *default* behavior for HTML5 pages be that "time stops" when a page is not visible. 
> > If a programmer has a good reason to run javascript on an invisible page then they 
> > should have to pass an option to make it clear that they know what they are doing.
>
> One challenge with this approach is that there's no good way at present to make time stop for a > plugin. I suspect more generally that this approach would cause compatibility bugs.

Yeah. I expect this would break some stuff. It could be useful to think about what people might be doing that could be broken, so we can see if there is an easy solution.

Are you aware of any common patterns in which a plugin communicates with javascript in such a way that the app would stop working if javascript timer events stopped firing for a while?

My hunch is that the general problem of "javascript doesn't run for a while" (in the absence of plugins) shouldn't break many web sites, since this is already what happens when a computer goes to sleep. OTOH there is probably something I'm missing.

-Rob

Received on Wednesday, 21 October 2009 18:27:48 UTC