-
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
lib: cache parsed source maps to reduce memory footprint #46225
lib: cache parsed source maps to reduce memory footprint #46225
Conversation
This also improves performance to map the stack trace when the `Error.stack` is accessed.
e18e63f
to
5c44985
Compare
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1292/ Results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I'm somewhat baffled by that ObjectGetValueSafe()
function. What's its purpose?
If it's to protect against someone users monkey-patching Object.prototype
, wouldn't it be better/simpler/more efficient to use symbols instead of named properties?
Landed in 651c09c |
Thanks for pointing this out. I'll submit a follow-up PR to make those plain objects to be null-prototyped so that we can get rid of |
This also improves performance to map the stack trace when the `Error.stack` is accessed. PR-URL: #46225 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Hi all, I see this has so far only been released in v19.6.0. What's the process to get it released on the v18 branch? FYI there's still an active bug in v18 that this fix attempts to address. |
This uses |
This also improves performance to map the stack trace when the
Error.stack
is accessed.Fixes #46140.