0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/tools
Joyee Cheung 0858e5d9d8
src: always compile and store code cache for native modules
This patch changes the NativeModuleLoader to always try to find
code cache for native modules when it compiles them, and always
produce and store the code cache after compilation. The cache
map is protected by a mutex and can be accessed by different
threads - including the worker threads and the main thread. Hence any
thread can reuse the code cache if the native module has already
been compiled by another thread - in particular the cache of the
bootstrappers and per_context.js will always be hit when a new thread
is spun.

This results in a ~6% startup overhead in the worst case
(when only the main thread is launched without requiring any additional
native module - it now needs to do the extra work of finding and
storing caches), which balances out the recent improvements by moving
the compilation to C++, but it also leads to a ~60% improvement in
the best case (when a worker thread is spun and requires a lot of native
modules thus hitting the cache compiled by the main thread).

PR-URL: https://github.com/nodejs/node/pull/24950
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-18 18:02:11 +08:00
..
bootstrap
clang-format tools: add missing package-lock to clang-format 2018-08-25 17:09:59 +02:00
configure.d tools, icu: actually failover if there are multiple URLs 2018-10-24 08:27:19 -07:00
doc tools: make apilinks building more robust 2018-12-18 05:14:24 +01:00
eslint-rules tools: capitalize sentences 2018-12-10 17:07:18 +01:00
gyp build, tools, win: add .S files support to GYP 2018-11-29 11:09:03 +01:00
icu tools: prepare tools/icu/icutrim.py for Python 3 2018-12-10 08:37:54 -08:00
inspector_protocol inspector: add inspector_protocol as a direct dependency 2018-08-10 18:03:43 -07:00
jinja2 inspector: add inspector_protocol as a direct dependency 2018-08-10 18:03:43 -07:00
macos-installer
markupsafe inspector: add inspector_protocol as a direct dependency 2018-08-10 18:03:43 -07:00
msvs build,win: pack the install-tools scripts for dist 2018-12-05 18:58:30 -08:00
node_modules tools: update ESLint to 5.10.0 2018-12-10 08:47:26 -05:00
node-lint-md-cli-rollup tools: replace rollup with ncc 2018-12-05 14:02:17 -08:00
pip build: add lint-py which uses flake8 2018-10-24 17:19:28 -04:00
pkgsrc
rpm
.eslintrc.yaml
build-addons.js
certdata.txt
check_macros.py
check-imports.py
compress_json.py tools: prepare ./tools/compress_json.py for Python 3 2018-12-10 19:46:50 -08:00
cpplint.py benchmark,doc,lib,src,test,tools: fix typos 2018-10-09 16:53:12 +03:00
create_android_makefiles
create_expfile.sh
dcheck_macros.py test: do not lint macros files (again) 2018-12-11 12:16:40 +01:00
generate_code_cache.js src: always compile and store code cache for native modules 2018-12-18 18:02:11 +08:00
genv8constants.py tools: prepare tools/genv8constants.py for Python 3 2018-12-06 10:36:54 -08:00
getmoduleversion.py
getnodeversion.py
gyp_node.py tools: use print() function on both Python 2 and 3 2018-11-25 18:58:58 -05:00
install.py tools: prepare tools/install.py for Python 3 2018-12-06 10:30:04 +01:00
js2c.py src: remove code cache integrity check 2018-12-18 18:02:08 +08:00
license2rtf.js
license-builder.sh deps: introduce llhttp 2018-11-10 17:54:21 -05:00
lint-js.js benchmark,doc,lib,src,test,tools: fix typos 2018-10-09 16:53:12 +03:00
lint-md.js tools: replace rollup with ncc 2018-12-05 14:02:17 -08:00
lint-pr-commit-message.sh tools: don't use GH API for commit message checks 2018-11-30 23:09:41 -08:00
lsan_suppressions.txt
macos-firewall.sh
make-v8.sh build,tools: update make-v8.sh for ppc64le 2018-11-16 14:26:46 -05:00
mk-ca-bundle.pl
mkssldef.py
nodcheck_macros.py test: do not lint macros files (again) 2018-12-11 12:16:40 +01:00
osx-codesign.sh
osx-pkg-postinstall.sh
osx-productsign.sh
release.sh tools: only sign release if promotion successful 2018-11-30 21:23:01 -08:00
run-valgrind.py tools: use print() function on both Python 2 and 3 2018-11-25 18:58:58 -05:00
run-worker.js
sign.bat
specialize_node_d.py tools: prepare tools/specialize_node_d.py for Python 3 2018-12-06 22:45:08 -08:00
test-npm-package.js
test-v8.bat
test.py tools: prepare tools/testp.py for Python 3 2018-12-10 15:32:16 -08:00
update-authors.js tools: implement update-authors in JS 2018-09-14 18:58:25 +02:00
update-babel-eslint.sh tools: update dmn to 2.0.0 2018-09-06 13:06:54 -07:00
update-eslint.sh tools: update dmn to 2.0.0 2018-09-06 13:06:54 -07:00
utils.py