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

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 Wednesday, 11 March 2015 16:59:51 UTC