Avoid copying file-backed V8 snapshot blobs during startup

Đang mở
#67,600 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
backend, performance

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
124k
Fork
38k
Merge trung bình
4 ngày 2 giờ
Pull request đã merge (30 ngày)
266

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nodejs/node

Tất cả issue của nodejs/node

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.