Skip to content

Contextual and GC friendly perf_hooks user timing #42503

Closed as not planned
Closed as not planned

Description

@legendecas

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

Activity

  1. added
    feature requestIssues requesting new Node.js features.
    perf_hooksIssues and PRs related to the perf_hooks module and performance measurement APIs.
    discussIssues opened for discussion and feedback.
    diag-agendaIssues and PRs to discuss during Diagnostics Working Group meetings.
    and removed
    feature requestIssues requesting new Node.js features.
    on Mar 28, 2022
  2. removed
    diag-agendaIssues and PRs to discuss during Diagnostics Working Group meetings.
    on Apr 18, 2022
  3. github-actions commented on Jun 25, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 210 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  4. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Jun 25, 2026
  5. github-actions commented on Jul 26, 2026

    @github-actions
    Contributor

    This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
    If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussIssues opened for discussion and feedback.perf_hooksIssues and PRs related to the perf_hooks module and performance measurement APIs.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions