Node.js® is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.
Published By From Node.js News · 1 min read
ReleaseNode.js 22.1.0 (Current)
This patch implements automatic on-disk code caching that can be enabled via an environment variable NODE_COMPILE_CACHE=/path/to/cache/dir .
When set, whenever Node.js compiles a CommonJS or a ECMAScript Module, it will use on-disk V8 code cache persisted in the specified directory to speed up the compilation. This may slow down the first load of a module graph, but subsequent loads of the same module graph may get a significant speedup if the contents of the modules do not change. Locally, this speeds up loading of test/fixtures/snapshot/typescript.js from ~130ms to ~80ms.
To clean up the generated code cache, simply remove the directory. It will be recreated the next time the same directory is used for NODE_COMPILE_CACHE .
This is an excerpt. The full article is published by Node.js News.
Answers to common questions regarding this article's topic, architecture, and practical applications.
[ 44ee04cf9f ] - buffer : improve base64 and base64url performance (Yagiz Nizipli) #52428 [ 3c37ce5710 ] - (SEMVER-MINOR) dns : add order option and support ipv6first (Paolo Insogna) #52492 [ 3026401be1 ] - events,doc : mark CustomEvent as stable (Daeyeon Jeong) #52618 [ 64428dc1c9 ] - (SEMVER-MINOR) lib, url : add a windows option to path parsing (Aviv Keller) #52509 [ d79ae74f71 ] - (SEMVER-MINOR) net : add CLI option for autoSelectFamilyAttemp
General
This patch implements automatic on-disk code caching that can be enabled
via an environment variable NODE_COMPILE_CACHE=/path/to/cache/dir. When set, whenever Node.js compiles a CommonJS or a ECMAScript Module,
it will use on-disk V8 code cache
persisted in the specified directory
to speed up the compilation. This may slow down the first load of a
module graph, but subsequent loads of the same module graph may get
a significant speedup if the con
How It Works
This patch implements automatic on-disk code caching that can be enabled via an environment variable NODE_COMPILE_CACHE=/path/to/cache/dir.
Windows 32-bit Installer: https://nodejs.org/dist/v22.1.0/node-v22.1.0-x86.msi
Windows 64-bit Installer: https://nodejs.org/dist/v22.1.0/node-v22.1.0-x64.msi
Windows ARM 64-bit Installer: https://nodejs.org/dist/v22.1.0/node-v22.1.0-arm64.msi
Windows 32-bit Binary: https://nodejs.org/dist/v22.1.0/win-x86/node.exe
Windows 64-bit Binary: https://nodejs.org/dist/v22.1.0/win-x64/node.exe
Windows ARM 64-bit Binary: https://nodejs.org/dist/v22.1.0