[WebPerf] about ISSUE-4: "We perhaps should support an element parameter to requestAnimationFrame()]"

Hi everyone,

According to the spec here: http://www.w3.org/TR/animation-timing/
It looks that this is still a pending issue to decide wether or not an
element should be passed as argument.
tracked issue looks to be: http://www.w3.org/2010/webperf/track/issues/4

I have not been following this topic initially, but because I was hit by a
performance issue, my research brought me to the spec of
requestAnimationFrame.

For what it's worth, my use case is that I have a few WebGL canvas, each of
them is transformed / animated and the code to update them perform
computations with JS (Each canvas displays its own 3D Scene).
Ideally, I would like that my canvas that are out the visible area of the
page to be not updated (by not having their requestAnimation frame callback
invoked).
In my case I have the bandwidth to handle all the visible canvas, but
clearly not to handle the computations involved by the 100 not visible
others…

Note that even if I had a single 3D scene being drawn in a WebGL canvas,
having it creeping around while it's not possible would still be an issue...

So, while it is certainly tricky to implement right on the browser side,
this would be probably very beneficial (and IMO because of the coming uses
cases involved by WebGL).

Do you have more details about the status of
http://www.w3.org/2010/webperf/track/issues/4  ?
Any insights about having the spec updated to allow an argument in
requestAnimationFrame or a reason not to do so ?

Many thanks,
Fabrice.

Received on Thursday, 28 June 2012 18:49:15 UTC