This syncs our dependencies to the latest version. There is still a reported vulnerability in postcss, but we are luckily unaffected. However, we can't upgrade postcss yet, as stylelint requires it and can not use postcss 8 yet: https://github.com/stylelint/stylelint/issues/4942#issuecomment-823513767 Also updated manage_node_deps.py to not run the full install when running `ls`, to allow for easier inspection of our dependency graph. R=jacktfranklin@chromium.org Bug: none Change-Id: I1c9e4836fca25500e2e7277ec82b13bf2b881dca Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2887731 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
v8-compile-cache
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.
The ability to tap into V8 to produce/consume this cache was introduced in Node v5.7.0.
Usage
- Add the dependency:
$ npm install --save v8-compile-cache
- Then, in your entry module add:
require('v8-compile-cache');
Requiring v8-compile-cache in Node <5.7.0 is a noop – but you need at least Node 4.0.0 to support the ES2015 syntax used by v8-compile-cache.
Options
Set the environment variable DISABLE_V8_COMPILE_CACHE=1 to disable the cache.
Cache directory is defined by environment variable V8_COMPILE_CACHE_CACHE_DIR or defaults to <os.tmpdir()>/v8-compile-cache-<V8_VERSION>.
Internals
Cache files are suffixed .BLOB and .MAP corresponding to the entry module that required v8-compile-cache. The cache is entry module specific because it is faster to load the entire code cache into memory at once, than it is to read it from disk on a file-by-file basis.
Benchmarks
See https://github.com/zertosh/v8-compile-cache/tree/master/bench.
Load Times:
| Module | Without Cache | With Cache |
|---|---|---|
babel-core |
218ms |
185ms |
yarn |
153ms |
113ms |
yarn (bundled) |
228ms |
105ms |
^ Includes the overhead of loading the cache itself.
Acknowledgements
FileSystemBlobStoreandNativeCompileCacheare based on Atom's implementation of their v8 compile cache:mkdirpSyncis based on: