Re: [ResourceTiming] Clarifying a few things...

On 13 April 2012 22:10, James Simonsen <simonjam@chromium.org> wrote:
> On Wed, Apr 11, 2012 at 8:27 AM, Andy Davies <dajdavies@gmail.com> wrote:
>>
>> 3. clearResourceTimings discards the buffer entries up to the current
>> buffersize, and the buffer is re-populated starting with the resource
>> that's at buffersize +1 (if there are that many on the page)?
>
>
> No, if the buffer is full when a resource loads, it's forgotten. You need to
> empty the buffer when the full event fires or you'll lose data.

Re-read the section onresourcetimingbufferfull and can see it now, but
the spec might want to make it how the PerformanceEntryList buffer
works clearer.

Hmm, that works on the premise that the event handler can be added
before the event fires which is problematic for bookmarklets and may
be for beacons too...

If the event handler isn't in place in time, there's no way of telling
if data has been lost is there?

>
>> 4. setResourceTimingBufferSize - trying get a clear understanding of
>> this sentence:
>>
>> "If this method is not called, the default maximum number of
>> PerformanceResourceTiming resources stored must be 150, unless
>> otherwise specified by the user agent."
>>
>> Is this saying "the buffer must be a minimum of 150, but a UA can
>> specify it to be larger", or does it leave open the possibility that a
>> UA can specify it to be smaller than 150?
>
>
> The intent was that 150 is a minimum. We figured something like 90+% of
> pages would be fine with 150.
>
> We should probably clarify that.

150 does sort of sound fine.. the places where I'm seeing more than
that at the moment tend to be the product listings pages of online
stores, holiday companies etc.

I pulled the data for the latest (1st Apr) httparchive.org crawl and
built a histogram of number of pages by number of resources per page -
http://dl.dropbox.com/u/91644/Pages%20vs%20No.%20Resources.png

Based on this data I suspect the 150 mark is probably OK, though some
articles I've read suggest the number of resources per page is on the
up (particularly once third party resources get involved).

(The HTTPArchive has a sample of just over 100k URLs, and I suspect it
has a US leaning in content too, so it may not give a whole picture)

Cheers

Andy

Received on Monday, 16 April 2012 13:08:30 UTC