Re: Provide capability in user timing API to mark for user agent events

Please make sure that this doesn't expose things like paints that
happen due to, for example, a link changing color due matching a
:visited rule.

/ Jonas

On Wed, Mar 11, 2015 at 3:04 AM, Chih-Kai (Patrick) Wang <i@ckwang.info> 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?
>
> Thanks!
>
> Patrick
>
>

Received on Thursday, 12 March 2015 07:18:50 UTC