Skip to content

Commit

Permalink
Chore: add v8-compile-cache to speed up instantiation time
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
aladdin-add committed Jun 29, 2019
1 parent d8f2688 commit 8cd7adc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/api.js
Expand Up @@ -5,6 +5,7 @@

"use strict";

require("v8-compile-cache"); // to use V8's code cache to speed up instantiation time
const { CLIEngine } = require("./cli-engine");
const { Linter } = require("./linter");
const { RuleTester } = require("./rule-tester");
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -78,7 +78,8 @@
"strip-ansi": "^5.2.0",
"strip-json-comments": "^3.0.1",
"table": "^5.2.3",
"text-table": "^0.2.0"
"text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3"
},
"devDependencies": {
"@babel/core": "^7.4.3",
Expand Down

0 comments on commit 8cd7adc

Please sign in to comment.