Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
v8-compile-cache-lib
Advanced tools
Require hook for automatic V8 compile cache persistence
Weekly downloads
Readme
Fork of
v8-compile-cache
exposed as an API for programmatic usage in other libraries and tools.
v8-compile-cache-lib
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.
$ npm install --save v8-compile-cache-lib
require('v8-compile-cache-lib').install();
.install()
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-lib
.
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>
.
Cache files are suffixed .BLOB
and .MAP
corresponding to the entry module that required v8-compile-cache-lib
. 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.
See https://github.com/cspotcode/v8-compile-cache-lib/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.
v8-compile-cache
from which this library is forked.FileSystemBlobStore
and NativeCompileCache
are based on Atom's implementation of their v8 compile cache:
mkdirpSync
is based on:
FAQs
Require hook for automatic V8 compile cache persistence
The npm package v8-compile-cache-lib receives a total of 11,815,297 weekly downloads. As such, v8-compile-cache-lib popularity was classified as popular.
We found that v8-compile-cache-lib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.