w3c / resource-timing

Resource Timing
https://w3c.github.io/resource-timing/
Other
119 stars 35 forks source link

Should the spec mention "Queue entry" at somepoint? #367

Closed sefeng211 closed 1 year ago

sefeng211 commented 1 year ago

I am just glancing through the spec. One thing that I am confused is that I don't see the spec says to Queue the entry when the entry is added to the resource timing buffer. Or rather, the spec doesn't specify when an entry should be queued to the observers.

For instance, in the add a PerformanceResourceTiming entry step, shouldn't we say queue the entry after the Add new entry to the performance entry buffer sub-step?

Another place is in the copy secondary buffer step, do we need to say Queue the entry after the Add entry to the end of performance entry buffer step?

I see the mark resource timing step mentions this, however it's not referenced anywhere in the spec.

yoavweiss commented 1 year ago

@noamr - can you take a look? Did that get lost in the refactor?

noamr commented 1 year ago

https://w3c.github.io/resource-timing/#dfn-mark-resource-timing

  1. Queue entry

Am I missing something?

sefeng211 commented 1 year ago

Ah okay, I am wrong.

I think I got lost while comparing the Firefox implementation and the spec. Apparently Firefox queues the entry when we are adding it to the buffer, which doesn't align the current specification. So I thought the spec would be the same.

Sorry about this!