w3c / performance-timeline

Performance Timeline
https://w3c.github.io/performance-timeline/
Other
111 stars 34 forks source link

Unused flag "add to performance entry buffer flag" on queueing a PerformanceEntry #183

Closed legendecas closed 3 years ago

legendecas commented 3 years ago

The flag "add to performance entry buffer flag" in https://www.w3.org/TR/performance-timeline-2/#queue-a-performanceentry seems to be designed for adding the newly created PerformanceEntry to the associated performance entry buffer. Yet it is not used in spec performance-timeline, nor in user-timing.

In user-timing, both "Queue entry" steps in Performance.mark() and Performance.measure() doesn't set the optional flag, yet the entry is explicitly pushed to the entry buffer by "Add entry to the performance entry buffer". See https://www.w3.org/TR/user-timing-3/#mark-method step 3, https://www.w3.org/TR/user-timing-3/#measure-method step 11.

I'm wondering if the flag should used instead in user-timing, or the flag may just be removed?

npm1 commented 3 years ago

Indeed this is removed in the latest spec draft: https://w3c.github.io/performance-timeline/#queue-a-performanceentry

I believe it was used in the past to indicate that you cannot get certain entries from performance.getEntries() (like longtasks), but now that is in a registry (availableFromTimeline) since we'd like to buffer entries anyways for buffered flag observers. Closing but please let me know if I missed anything or you have any questions!

npm1 commented 3 years ago

Meant to link the registry: https://w3c.github.io/timing-entrytypes-registry/#registry