requestAnimationFrame rate for background tabs and offscreen instances

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

requestAnimationFrame rate for background tabs and offscreen instances

Jet Villegas-2
I met with some Chromium engineers over dinner last week and talked about
how Blink throttles rAF on background tabs to zero FPS, and that they're
also working on setting off-screen iframes to zero FPS. I believe we
currently throttle to 1 FPS for off-screen and background tabs.

Should we go to zero as well?

--Jet
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: requestAnimationFrame rate for background tabs and offscreen instances

Seth Fowler
We do eventually throttle rAF to zero for background tabs, IIRC (there’s an exponential decay phase first). IIRC, we mainly didn’t do it for offscreen iframes in foreground tabs because of concerns that there could be interaction between different iframes, so throttling an offscreen iframe totally off could also end up disabling a visible iframe. Till might remember more specifics.

I’d like to go to zero as well if we think we can get away with it. If Blink is *committed* to doing it too, then we probably can.

- Seth

> On Aug 31, 2015, at 11:08 AM, Jet Villegas <[hidden email]> wrote:
>
> I met with some Chromium engineers over dinner last week and talked about how Blink throttles rAF on background tabs to zero FPS, and that they're also working on setting off-screen iframes to zero FPS. I believe we currently throttle to 1 FPS for off-screen and background tabs.
>
> Should we go to zero as well?
>
> --Jet

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: requestAnimationFrame rate for background tabs and offscreen instances

Jet Villegas-2
Thanks, Seth. Please file a bug for us to capture the details of a plan
here.

--Jet

On Mon, Aug 31, 2015 at 11:21 AM, Seth Fowler <[hidden email]> wrote:

> We do eventually throttle rAF to zero for background tabs, IIRC (there’s
> an exponential decay phase first). IIRC, we mainly didn’t do it for
> offscreen iframes in foreground tabs because of concerns that there could
> be interaction between different iframes, so throttling an offscreen iframe
> totally off could also end up disabling a visible iframe. Till might
> remember more specifics.
>
> I’d like to go to zero as well if we think we can get away with it. If
> Blink is *committed* to doing it too, then we probably can.
>
> - Seth
>
> > On Aug 31, 2015, at 11:08 AM, Jet Villegas <[hidden email]>
> wrote:
> >
> > I met with some Chromium engineers over dinner last week and talked
> about how Blink throttles rAF on background tabs to zero FPS, and that
> they're also working on setting off-screen iframes to zero FPS. I believe
> we currently throttle to 1 FPS for off-screen and background tabs.
> >
> > Should we go to zero as well?
> >
> > --Jet
>
>
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: requestAnimationFrame rate for background tabs and offscreen instances

Boris Zbarsky
In reply to this post by Jet Villegas-2
On 8/31/15 2:08 PM, Jet Villegas wrote:
> I believe we
> currently throttle to 1 FPS for off-screen and background tabs.

As Seth pointed out, that's not what we do.

> Should we go to zero as well?

The real question here is what should get throttled.  Just rAF?  Or
everything we run off the refresh driver (rAF, SMIL animations, CSS
transitions/animations, etc)?  The latter fire page-visible events that
might well break pages if we turn them off completely, but I'm probably
OK throttling them all off altogether as long as Chrome does the same
thing (and we're sure they're doing it; e.g. they ship it).

-Boris

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: requestAnimationFrame rate for background tabs and offscreen instances

Cameron McCormack-4
Boris Zbarsky:
> The real question here is what should get throttled.  Just rAF?  Or
> everything we run off the refresh driver (rAF, SMIL animations, CSS
> transitions/animations, etc)?  The latter fire page-visible events
> that might well break pages if we turn them off completely, but I'm
> probably OK throttling them all off altogether as long as Chrome
> does the same thing (and we're sure they're doing it; e.g. they ship
> it).

This is the kind of thing the Google folks want to standardise in their
“rendering pipeline” spec.  From what I understood, they want to
throttle everything.  I have no idea if that is what they currently do.

--
Cameron McCormack ≝ http://mcc.id.au/
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: requestAnimationFrame rate for background tabs and offscreen instances

L. David Baron
On Wednesday 2015-09-02 10:53 +1000, Cameron McCormack wrote:

> Boris Zbarsky:
> > The real question here is what should get throttled.  Just rAF?  Or
> > everything we run off the refresh driver (rAF, SMIL animations, CSS
> > transitions/animations, etc)?  The latter fire page-visible events
> > that might well break pages if we turn them off completely, but I'm
> > probably OK throttling them all off altogether as long as Chrome
> > does the same thing (and we're sure they're doing it; e.g. they ship
> > it).
>
> This is the kind of thing the Google folks want to standardise in their
> “rendering pipeline” spec.  From what I understood, they want to
> throttle everything.  I have no idea if that is what they currently do.
Yes, http://logs.csswg.org/irc.w3.org/houdini/2015-08-29/#e589936
was very clear that they would want to throttle everything together;
I think I was under the impression that they currently only throttle
rAF.

But one of the key concepts they want to standardize in the
rendering pipeline spec is that there's a set of stuff that needs to
all happen together and cannot happen separately.

-David

--
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout

signature.asc (836 bytes) Download Attachment