Avoid copying file-backed V8 snapshot blobs during startup

Aberta
#67,600 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
javascript
Domínio
backend, performance

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
JavaScript
Estrelas
124k
Forks
38k
Merge médio
4d 2h
PRs com merge (30d)
266

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de nodejs/node

Todas as issues de nodejs/node

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.