mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-20 04:04:03 +02:00
Replace manifest slicing with a dynamic task queue: drivers request tasks on demand via WebSocket so parallel sessions self-balance naturally. Start reading reference PNGs from disk as soon as a task is dispatched (prefetchRefPngs) to overlap I/O with rendering. Release snapshot buffers and task entries immediately after comparison, and copy WS frame slices via Buffer.from() so the original frame buffer can be GC'd. Bump --max-old-space-size to 8192 MB as a workaround for a Puppeteer/BiDi memory leak where data: URL strings accumulate in BrowsingContext.#requests indefinitely: https://github.com/puppeteer/puppeteer/issues/14876