Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contextual and GC friendly perf_hooks user timing #42503

Open
legendecas opened this issue Mar 28, 2022 · 0 comments
Open

Contextual and GC friendly perf_hooks user timing #42503

legendecas opened this issue Mar 28, 2022 · 0 comments
Labels
discuss Issues opened for discussions and feedbacks. perf_hooks Issues and PRs related to the implementation of the Performance Timing API.

Comments

@legendecas
Copy link
Member

legendecas commented Mar 28, 2022

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.performance API.

The problem is more outstanding when using the perf_hooks.performance API 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

@legendecas legendecas added feature request Issues that request new features to be added to Node.js. perf_hooks Issues and PRs related to the implementation of the Performance Timing API. discuss Issues opened for discussions and feedbacks. diag-agenda Issues and PRs to discuss during the meetings of the diagnostics working group. and removed feature request Issues that request new features to be added to Node.js. labels Mar 28, 2022
@legendecas legendecas removed the diag-agenda Issues and PRs to discuss during the meetings of the diagnostics working group. label Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Issues opened for discussions and feedbacks. perf_hooks Issues and PRs related to the implementation of the Performance Timing API.
Projects
None yet
Development

No branches or pull requests

1 participant