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. |
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 89.99% 89.99% -0.01%
==========================================
Files 785 785
Lines 269347 269358 +11
Branches 51307 51313 +6
==========================================
+ Hits 242395 242403 +8
- Misses 17452 17459 +7
+ Partials 9500 9496 -4
🚀 New features to boost your workflow:
|
panva
approved these changes
Sep 8, 2026
This comment has been minimized.
This comment has been minimized.
Member
|
cc @nodejs/single-executable |
colinhacks
force-pushed
the
src-sea-borrow-snapshot-data
branch
from
September 11, 2026 18:33
ab51407 to
f385b3e
Compare
This comment has been minimized.
This comment has been minimized.
panva
approved these changes
Sep 12, 2026
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Collaborator
colinhacks
force-pushed
the
src-sea-borrow-snapshot-data
branch
from
September 13, 2026 12:34
f385b3e to
6586e1d
Compare
Signed-off-by: Colin McDonnell <3084745+colinhacks@users.noreply.github.com>
colinhacks
force-pushed
the
src-sea-borrow-snapshot-data
branch
from
September 13, 2026 12:36
6586e1d to
d1439f7
Compare
panva
approved these changes
Sep 13, 2026
Collaborator
gurgunday
approved these changes
Sep 13, 2026
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.