Re: [WebTiming] Exporting flattened DOMTiming data

On Mon, Apr 26, 2010 at 10:07 PM, Zhiheng Wang <zhihengw@google.com> wrote:
>    Discussions with several browser developers suggest exporting a flattened
> data structure containing
> all the DOMTiming objects on the page. Doing so allows site developers to
> send the all the timing information
> back for analysis without travelling the entire DOM tree. It helps minimize
> the observer effect of the client
> side instrumentations.
>   The current proposal is to add an additional interface to the WebTiming
> draft that exports this block of
> timing data, including the url, type and probably id associated with each
> DOMTiming object. The implementation
> details are mostly left to UAs at this time.
>   Another question is should this flattened data contain only DOMTiming
> objects currently in the DOM or all those
> ever exist since the page starts. My preference is the first case but it's
> up to debate.
>   I imagine this to be a rather significant change in terms of UA
> implementations so I would like to bring
> this up for discussion.

How about exposing the data on the 'load' event object instead. That
way you can just attach a capturing listener to the document object
and catch all events. That also removes the issue if only things
currently in the DOM should be 'listed', and automatically gives you a
reference from the timing data to the node that did the load.

It also lets you gather data about part of the DOM, by attaching a
listener to the root of the subtree you are interested in.

/ Jonas

Received on Tuesday, 27 April 2010 07:49:23 UTC