Files
pnpm/worker
Zoltan Kochan b591e56c46 perf: use worker threads for CAFS file writes
Add 'write-cafs-files' worker message type that writes batches of files
to the content-addressable store using the existing atomic write
infrastructure (writeBufferToCafs). The client now:

1. Fetches file batches from server via parallel HTTP requests
2. Dispatches each batch to worker pool for parallel CAFS writes

This gives us CPU_CORES parallel writers, matching the concurrency of
pnpm's normal tarball extraction pipeline.

Cold local store benchmark (1351 packages, hot server):
- Single connection: 76s
- Parallel HTTP only: 57s
- Parallel HTTP + workers: 25s (vs 22s baseline without registry)
2026-04-08 22:13:30 +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