- From: Philippe Le Hegaret <plh@w3.org>
- Date: Wed, 11 Mar 2015 14:29:45 -0400
- To: "Chih-Kai (Patrick) Wang" <i@ckwang.info>, public-web-perf@w3.org
- CC: tlee@mozilla.com, Boris Zbarsky <bzbarsky@mit.edu>, Eli Perelman <eperelman@mozilla.com>
On 03/11/2015 06:04 AM, Chih-Kai (Patrick) Wang wrote:
> Hi all,
>
> I am thinking of adding an API in navigator.performance to "ask
> browser to mark when something happens". Currently, user timing API
> provides us with methods to mark in web apps. However, to get more
> accurate mark of specific event, we may need supports from user agent.
> For example, we might care about when is the DOM modification we made in
> Javascript drawn onto screen. Calling to performance.mark() in the
> script is not able to mark when the composition happens. Another way is
> to listen to specific event of the operation, but the event itself takes
> time to propagate to content. For instance, under current multi-process
> architecture Firefox OS, the MozAfterPaint event in content process can
> be fired in up to 80ms after the corresponding composition done in
> parent process.
>
> The API I'd like to expose might look like:
>
> performance.delayedMark('composite', 'done-visually-update');
>
> which means "set a 'done-visually-update' mark when next composition
> happens".
>
> Do you have any thought or comment?
>
My understanding is that the ability to figure out a DOM modification is
actually being displayed on the screen is tricky and varies greatly
between the browser engines. Did you look into Frame Timing?
http://w3c.github.io/frame-timing/
Philippe
Received on Wednesday, 11 March 2015 18:29:48 UTC