W3C home > Mailing lists > Public > public-web-perf@w3.org > April 2013

Re: Resource timing buffer

From: James Simonsen <simonjam@google.com>
Date: Mon, 29 Apr 2013 18:18:38 -0700
Message-ID: <CAPVJQimvv=Uz_Wc45LZHePasTy=_VZULfUyP5Jsu0ymuJXpWtw@mail.gmail.com>
To: Nic Jansma <nic@nicj.net>
Cc: Arvind Jain <arvind@google.com>, public-web-perf <public-web-perf@w3.org>
That implies that the buffer can change while
the onresourcetimingbufferfull callback is running. Is that expected?
That'd mean it's not safe to clearResourceTimings() after getEntries(),
because a new entry may have appeared in the meantime.

In Blink, this would only be possible if a synchronous request took place
during the callback. I don't think that's something we should go out of our
way to support.

James


On Mon, Apr 29, 2013 at 6:10 PM, Nic Jansma <nic@nicj.net> wrote:

>  I believe the idea was to give the developer the opportunity to smartly
> manager their RT buffer instead of just setting it at 10,000 (and consume
> resources) so they didn't have to worry about it.
>
> For example, a developer could leave the default 150 buffer size and:
> 1) Listen to onresourcetimingbufferfull
> 2) When onresourcetimingbufferfull is triggered:
> 2a) getEntriesByType(...) and analyze/process/submit/store these 100
> resources if they wanted
> 2b) clearResourceTimings()
> 3) In the meantime, the browser has been caching any new entries and takes
> the action defined in onresourcetimingbufferfull (
> http://www.w3.org/TR/resource-timing/#dom-performance-onresourcetimingbufferfull)
> after the callback has completed.
> 4) The developer can now analyze any new events that came in during step
> #2 or wait for the next onresourcetimingbufferfull
>
> Otherwise, if any new RT events come in after #1, and the browser stops
> recording them, the developer has no way of knowing they occurred and
> cannot retrieve them.
>
> - Nichttp://nicj.net/
> @nicj
>
> On 4/29/2013 7:32 PM, Arvind Jain wrote:
>
> http://www.w3c-test.org/webperf/specs/ResourceTiming/
>
> Re. this comment:
> onresourcetimingbufferfull attribute
> ....*While executing the onresourcetimingbufferfull callback,
> PerformanceResourceTiming will continue to be collected beyond the maximum
> limit of the resources allowed*....
>
>  I tried to look up why we added it and couldn't find anything. Currently
> this logic is not implemented by IE and Chrome.
>
>  Should we remove this? i.e. once the limit is reached, don't store new
> resource timing objects irrespective of whether you are executing this
> callback or not.
>
>  Arvind
>
>
>
Received on Tuesday, 30 April 2013 01:19:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:35 UTC