Files
pnpm/worker
Zoltan Kochan e015cee529 perf: skip SHA-512 rehashing and use direct file write for registry files
The worker now writes files from the registry using the pre-computed
digest from the server, skipping:
- crypto.hash('sha512', buffer) for every file (33K hashes on 287MB)
- statSync to check if file exists first
- temp file + rename for atomic write

Instead, uses writeFileSync with O_CREAT|O_EXCL (flag: 'wx') which
creates the file atomically or fails silently if it already exists.

Also exports contentPathFromHex from @pnpm/store.cafs.

Benchmark: 14.8s (down from 16.2s, baseline 22s)
2026-04-09 01:55:47 +02:00
..
2025-10-21 15:30:20 +02:00

@pnpm/worker

A worker for extracting package tarballs to the store

npm version

Installation

pnpm add @pnpm/worker

License

MIT