Closed JosephPecoraro closed 7 years ago
If the spec wants to clarify this, it can mention that PerformanceEntry creation time should be used when startTime is equivalent (effectively this is like "insertion order"). Otherwise the spec can be have a note that implementations may differ on the sort of equivalent startTime entries.
Either way, I can add a web-platform-test for sort.
Conclusion from the 2/8 W3C call: Keep the startTime ordering. Sites may depend on this. Add a note that entries with the same startTime have unspecified ordering.
The spec says that entries in PerformanceObserverEntryList should be sorted by start time:
However, many entries may contain equivalent
startTime
and implementations may differ on how these are sorted.In this test:
With times:
0 < t1 < t2
:0
t1
t1
t2
Implementations sort these differently:
Chrome (v58) measure1 - 0 measure3 - 0 measure2 - 0 mark1 - 110.115 measure-matching-mark2-1 - 110.14 mark2 - 110.14 measure-matching-mark2-2 - 110.14 mark3 - 110.155
Firefox (v54) No sort whatsoever.
Take just the top 3 in Chrome. It feels weird to have
measure2
sorted aftermeasure3
even though they have the samestartTime
.