Avoid copying file-backed V8 snapshot blobs during startup

Aperta
#67,600 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript

Direzione di ricerca

Start by reading SnapshotData::FromFile in src/node_snapshotable.cc and the linked prototype branch to understand how the file buffer is retained for V8 startup data. Check Node's snapshot validation and error handling, then identify the relevant snapshot loading tests and run them after changes. Done means file-backed snapshots avoid a second payload copy while preserving validation and error behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Node's --snapshot-blob path currently copies the V8 payload while reading a snapshot file in SnapshotData::FromFile. For large snapshots, that adds startup copying and increases peak memory.

I have a prototype on the vsl-node-snapshot-launcher fork branch. It keeps the file buffer alive on SnapshotData and gives V8 a non-owning view of the existing bytes, while retaining Node's current snapshot validation and error handling. Would this ownership approach fit Node's snapshot loading model?

Prototype and validation

The branch changes SnapshotData::FromFile to retain the file bytes for the lifetime of the V8 startup data and avoid making a second copy of the V8 payload.

No Node build or tests have been run yet.

Lingua principale
JavaScript
Stelle
124k
Fork
38k
Merge medio
4g 2h
PR unite (30g)
266

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nodejs/node

Tutte le issue di nodejs/node

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.