Skip to content

util.getCallSites(): rationale for 200-frame cap and possibility to make it configurable #62910

@scull06

Description

@scull06

Hi,

I’ve been evaluating util.getCallSites() for use in runtime analysis, and I noticed that the API enforces a limit of 200 frames. I could not find documentation explaining the rationale behind this cap.

The limit is enforced at the Node.js util layer, not by V8 itself.
V8’s stack trace facilities (e.g., Error.stackTraceLimit) do not seem to impose such a low fixed bound.

This raises a few questions:
What is the motivation for the 200-frame cap?
Is it purely a performance safeguard?
Are there known pathological cases that justify this specific bound?
Is the limit intended to be a permanent API constraint, or just a conservative initial choice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    utilIssues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions