Re: Notification for new navigation timing entries

On Wed, Oct 22, 2014 at 3:28 PM, Nat Duca <nduca@google.com> wrote:

> Forgive me for replying late in this thread but this direction is very
> concerning for non-navigation uses of the timeline. Things like putting
> frames in the timeline, for instance. We're loookign at huge numbers of
> these callbacks, proportional to how much we want to put in the timeline.
> This then means that putting things into the timeline is performance
> disturbing!
>
> Please, please please, consider the mutation observers model where a
> single event is fired on the microtask unwind.
>

Hmm.. Josh's original proposal did suggest batching events, but I nudged it
towards individual events:
https://github.com/w3c/performance-timeline/issues/1#issuecomment-59538916

If we revert back to the batched model... how about:

  performance.addEventListener('entries', function(events) {
    events.forEach(function(event) {
       // process event: event.entry.name, event.entry.entryType, etc...
    }
  });

Does that look reasonable? What's the logic for batching these events?

ig

Received on Wednesday, 22 October 2014 23:02:41 UTC