From cc3885b028e29ebc575c900f43af81cb0dabffb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E7=8C=AB?= Date: Wed, 3 Jul 2019 23:26:07 +0800 Subject: [PATCH] Chore: add v8-compile-cache to speed up instantiation time (#11921) * 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. --- bin/eslint.js | 3 +++ package.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/eslint.js b/bin/eslint.js index b6b14d3a2ba..061e94767f0 100755 --- a/bin/eslint.js +++ b/bin/eslint.js @@ -9,6 +9,9 @@ "use strict"; +// to use V8's code cache to speed up instantiation time +require("v8-compile-cache"); + //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ diff --git a/package.json b/package.json index a1c3aa0d595..068b4e1858a 100644 --- a/package.json +++ b/package.json @@ -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",