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
Chore: add v8-compile-cache to speed up instantiation time #11921
Conversation
v8-compile-cache attaches a require hook to use V8's code cache to speed up instantiation time. The "code cache" is the work of parsing and compiling done by V8.
a30e85d
to
60ccfa2
Compare
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.
Thank you for your contribution.
I have a suggestion that we should use the cache only in our CLI. A library should not have side effects that change the application behavior globally.
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, thanks!
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!
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, thank you!
v8-compile-cache attaches a require hook to use V8's code cache to speed up instantiation time.
The "code cache" is the work of parsing and compiling done by V8.
What is the purpose of this pull request? (put an "X" next to item)
[x] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
I've make a perf test:
before:
after:
node: v12.4.0
os: macos 10.14.5 (18F132)
cpu: 2.5 GHz Intel Core i7
mem: 16 GB 2133 MHz LPDDR3
Is there anything you'd like reviewers to focus on?
is this something we want to add?