-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
[v18.x] backport startup performance patches #46425
Commits on Oct 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 10f5974 - Browse repository at this point
Copy the full SHA 10f5974View commit details -
test: use an array for WPT gloablThis initialization scripts
So that we can add multiple initialization scripts in the test runner. Refs: nodejs#44483
Configuration menu - View commit details
-
Copy full SHA for 3076119 - Browse repository at this point
Copy the full SHA 3076119View commit details -
bootstrap: lazy load non-essential modules
It turns out that even with startup snapshots, there is a non-trivial overhead for loading internal modules. This patch makes the loading of the non-essential modules lazy again. Caveat: we have to make some of the globals lazily-loaded too, so the WPT runner is updated to test what the state of the global scope is after the globals are accessed (and replaced with the loaded value). PR-URL: nodejs#45659 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Tierney Cyren <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9960b3d - Browse repository at this point
Copy the full SHA 9960b3dView commit details -
bootstrap: support module_wrap binding in snapshot
PR-URL: nodejs#45849 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a73d729 - Browse repository at this point
Copy the full SHA a73d729View commit details -
bootstrap: include event_target into the built-in snapshot
Since the module has to be loaded during bootstrap anyway. PR-URL: nodejs#45849 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1892b8d - Browse repository at this point
Copy the full SHA 1892b8dView 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. PR-URL: nodejs#45849 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4a6a473 - Browse repository at this point
Copy the full SHA 4a6a473View commit details -
lib: add getLazy() method to internal/util
This patch adds a getLazy() method to facilitate initialize-once lazy loading in the internals. PR-URL: nodejs#45849 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 92c4600 - Browse repository at this point
Copy the full SHA 92c4600View commit details -
lib: lazy-load deps in source_map_cache.js
So that the file can be snapshotted. PR-URL: nodejs#45849 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9a9a5b5 - Browse repository at this point
Copy the full SHA 9a9a5b5View commit details -
lib: lazy-load deps in modules/run_main.js
So that the file can be snapshotted PR-URL: nodejs#45849 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ce5f49e - Browse repository at this point
Copy the full SHA ce5f49eView 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. PR-URL: nodejs#45849 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9ea0ae4 - Browse repository at this point
Copy the full SHA 9ea0ae4View commit details -
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. PR-URL: nodejs#45849 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5060fd2 - Browse repository at this point
Copy the full SHA 5060fd2View 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. PR-URL: nodejs#45849 Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6c1abed - Browse repository at this point
Copy the full SHA 6c1abedView commit details
Commits on Nov 8, 2023
-
deps: V8: cherry-pick d69c7937c99d
Original commit message: [snapshot] Dont defer ByteArray when serializing JSTypedArray needs the base_pointer ByteArray immediately if it's on heap. JSTypedArray's base_pointer was initialized to Smi::uninitialized_deserialization_value at first when deserializing, and if base_pointer was deferred, we will mistakenly check JSTypedArray not on heap. Bug: v8:13149 Change-Id: I104c83ff9a2017de1c8071a9e116baa602f6977d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813068 Reviewed-by: Jakob Linke <[email protected]> Commit-Queue: 王澳 <[email protected]> Cr-Commit-Position: refs/heads/main@{#82254} Refs: v8/v8@d69c793
Configuration menu - View commit details
-
Copy full SHA for bfa6a2e - Browse repository at this point
Copy the full SHA bfa6a2eView commit details