src: avoid copying SEA snapshot data - #65876
Open
colinhacks wants to merge 1 commit into
Open
Conversation
Collaborator
|
Review requested:
|
Contributor
|
Welcome to Node.js, and thank you for your first contribution! Before review, please take a moment to read:
Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal. |
Signed-off-by: Colin McDonnell <3084745+colinhacks@users.noreply.github.com>
colinhacks
force-pushed
the
src-sea-borrow-snapshot-data
branch
from
September 7, 2026 12:24
e9e9b50 to
ab51407
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #65876 +/- ##
==========================================
- Coverage 92.37% 90.19% -2.18%
==========================================
Files 417 771 +354
Lines 188656 264921 +76265
Branches 28838 50336 +21498
==========================================
+ Hits 174268 238950 +64682
- Misses 14051 16954 +2903
- Partials 337 9017 +8680
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
SEA snapshots live in a resource mapped from the executable. Node.js currently copies the V8 startup data out of that resource when it loads the snapshot.
This change lets V8 read the data in place. Snapshots loaded from a file or through the embedder API still use a copy because those buffers may not live long enough.
Benchmark
Median of 240 launches in randomized order, after 30 warmups. Linux x64 on an Intel Xeon Platinum 8481C. Both executables were built from
6f41e415639b5ec3dd816e44945cc73b4d7651e3.Validation
make lint-cpppython3 tools/test.py --mode=release seamake -j22 test-onlyAI disclosure: I used a coding agent for the investigation, patch, benchmarks, and PR text. It checked the resource lifetime against the source, built Node.js, and ran the tests above. I approved the PR and will handle review comments myself.