-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
perf_hooks: reduce overhead of new resource timings #49837
perf_hooks: reduce overhead of new resource timings #49837
Conversation
I would use a new symbol for each constructor so that if other parts in the code base need to create something in a way not exposed to userland they need to explicitly import it. We use this pattern in many other places like event_target too. |
42d7511
to
cdcfc29
Compare
Landed in e6e320e |
PR-URL: nodejs#49837 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: nodejs#49837 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: #49837 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: nodejs#49837 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Continuing the work started on nodejs/performance#109.
This PR should be landed after #49803.
I want to use the symbolkSkipThrow
in other classes around the NodeJS codebase, someone had some idea where I should put it? Or create a new symbol and reuse it when possible?Right now, we have this symbol being used onperf_hooks
but there is also an identical symbol onwebstreams
, so maybe we can put it in a higher module and import it around the node, I initially thought to put it insideerrors
, since we will always use it together withERR_ILLEGAL_CONSTRUCTOR
.I will reuse the same symbol only when it inherits some class that exports a symbol, otherwise, I will create a new one.
/cc @nodejs/performance