New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bootstrap: optimize modules loaded in the built-in snapshot #45849
Commits on Dec 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for b801b22 - Browse repository at this point
Copy the full SHA b801b22View commit details -
bootstrap: include event_target into the built-in snapshot
Since the module has to be loaded during bootstrap anyway.
Configuration menu - View commit details
-
Copy full SHA for 43db8f8 - Browse repository at this point
Copy the full SHA 43db8f8View commit details -
modules: move modules/cjs/helpers.js to modules/helpers.js
The helpers are actually shared by the two loaders, so move them under modules/ directly.
Configuration menu - View commit details
-
Copy full SHA for b9509a1 - Browse repository at this point
Copy the full SHA b9509a1View commit details -
lib: add getLazy() method to internal/util
This patch adds a getLazy() method to facilitate initialize-once lazy loading in the internals.
Configuration menu - View commit details
-
Copy full SHA for 9c65244 - Browse repository at this point
Copy the full SHA 9c65244View commit details -
lib: lazy-load deps in source_map_cache.js
So that the file can be snapshotted.
Configuration menu - View commit details
-
Copy full SHA for 30e18ee - Browse repository at this point
Copy the full SHA 30e18eeView commit details -
lib: lazy-load deps in modules/run_main.js
So that the file can be snapshotted
Configuration menu - View commit details
-
Copy full SHA for e263a61 - Browse repository at this point
Copy the full SHA e263a61View commit details -
modules: move callbacks and conditions into modules/esm/utils.js
This moves the following utils into modules/esm/utils.js: - Code related to default conditions - The callbackMap (which is now created in the module instead of hanging off the module_wrap binding, since the C++ land does not need it). - Per-isolate module callbacks These are self-contained code that can be included into the built-in snapshot.
Configuration menu - View commit details
-
Copy full SHA for ae5d36c - Browse repository at this point
Copy the full SHA ae5d36cView commit details
Commits on Dec 14, 2022
-
bootstrap: make CJS loader snapshotable
This patch makes the top-level access to runtime states in the CJS loader lazy, and move the side-effects into a initializeCJS() function that gets called during pre-execution. As a result the CJS loader can be included into the built-in snapshot.
Configuration menu - View commit details
-
Copy full SHA for 203164b - Browse repository at this point
Copy the full SHA 203164bView commit details -
bootstrap: optimize modules loaded in the built-in snapshot
Preload essential modules and lazy-load non-essential ones. After this patch, all modules listed by running this snippet: ``` const list = process.moduleLoadList.join('\n'); require('fs').writeSync(1, list, 'utf-8'); ``` (which is roughly the same list as the one in test-bootstrap-module.js for the main thread) are loaded from the snapshot so no additional compilation cost is incurred.
Configuration menu - View commit details
-
Copy full SHA for f3b3652 - Browse repository at this point
Copy the full SHA f3b3652View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d57732 - Browse repository at this point
Copy the full SHA 8d57732View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c7011a - Browse repository at this point
Copy the full SHA 0c7011aView commit details -
Configuration menu - View commit details
-
Copy full SHA for cf4681e - Browse repository at this point
Copy the full SHA cf4681eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e8a4b5e - Browse repository at this point
Copy the full SHA e8a4b5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for faa6501 - Browse repository at this point
Copy the full SHA faa6501View commit details
Commits on Dec 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for adcd3d2 - Browse repository at this point
Copy the full SHA adcd3d2View commit details