Skip to content
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

Merged
merged 3 commits into from Jul 3, 2019

Conversation

@aladdin-add
Copy link
Member

commented Jun 29, 2019

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:
image

after:
image

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?

Chore: add v8-compile-cache to speed up instantiation time
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.

@aladdin-add aladdin-add force-pushed the aladdin-add:chore/v8-cache branch from a30e85d to 60ccfa2 Jun 29, 2019

@mysticatea
Copy link
Member

left a comment

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.

lib/api.js Outdated Show resolved Hide resolved
@platinumazure
Copy link
Member

left a comment

LGTM, thanks!

@platinumazure platinumazure requested a review from mysticatea Jul 2, 2019

@kaicataldo
Copy link
Member

left a comment

LGTM!

@mysticatea
Copy link
Member

left a comment

LGTM, thank you!

@aladdin-add aladdin-add merged commit cc3885b into eslint:master Jul 3, 2019

9 checks passed

commit-message PR title follows commit message guidelines
Details
continuous-integration Build #20190702.1 succeeded
Details
continuous-integration (Test on Node.js 10 (Linux)) Test on Node.js 10 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Linux)) Test on Node.js 12 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Windows)) Test on Node.js 12 (Windows) succeeded
Details
continuous-integration (Test on Node.js 12 (macOS)) Test on Node.js 12 (macOS) succeeded
Details
continuous-integration (Test on Node.js 8 (Linux)) Test on Node.js 8 (Linux) succeeded
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details

@aladdin-add aladdin-add deleted the aladdin-add:chore/v8-cache branch Jul 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.