-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
Contextual and GC friendly perf_hooks user timing #42503
Copy link
Copy link
Open
Labels
discussIssues opened for discussions and feedbacks.Issues opened for discussions and feedbacks.perf_hooksIssues and PRs related to the implementation of the Performance Timing API.Issues and PRs related to the implementation of the Performance Timing API.
Metadata
Metadata
Assignees
Labels
discussIssues opened for discussions and feedbacks.Issues opened for discussions and feedbacks.perf_hooksIssues and PRs related to the implementation of the Performance Timing API.Issues and PRs related to the implementation of the Performance Timing API.
Type
Fields
Give feedbackNo fields configured for issues without a type.
What is the problem this feature will solve?
Currently, it’s hard to manage GC lifetimes of user-timing entries without clearing all of them. Also, entries are identified by their names and types (marks or measures) to compute duration, thus it is quite easy for libraries to step on other's ways when using the
perf_hooks.performanceAPI.The problem is more outstanding when using the
perf_hooks.performanceAPI in server environments, as the performance entries are going to be created again and again with the same name and are hard to manage in the global performance timeline.What is the feature you are proposing to solve the problem?
As discussed at W3C PerfWG w3c/user-timing#86 (comment), there are interests in adding namespace support in the user-timing API.
With namespaces, performance entries could be all released at once when the namespace is no longer been used.
Opening this issue to gather visibility and feedback on the idea of w3c/user-timing#86.
/cc @jasnell