Avoid copying file-backed V8 snapshot blobs during startup

Ouverte
#67,600 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
javascript
Domaine
backend, performance

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
JavaScript
Étoiles
124k
Forks
38k
Merge moyen
4 j 2 h
PR mergées (30 j)
266

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de nodejs/node

Toutes les issues de nodejs/node

Issues similaires

Plus d'issues JavaScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.