nolanlawson / marky

High-resolution JavaScript timer based on performance.mark/measure (491 bytes min+gz)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Namespace for performance entries?

nolanlawson opened this issue · comments

Arguably marky shouldn't clear all the entries in marky.clear(), only its own. But this would require changing the current mark/measure system to prefix all marks, as suggested here: w3c/resource-timing#89 (comment)

Thus far I've assumed with marky that overall usage of the User Timing API is low enough that there is little danger of collisions; in fact my goal was to increase visibility of the UT API and get people to start using it. :) But as more libraries like React and Vue start to use it themselves, it may make sense to namespace. Arguably it would become a breaking change though.

@nolanlawson, the same goes for name which is given to measure API, right ?

I probably won't get around to this, although it is an interesting idea