#2427·puppeteer

Serialize Uint8Arrays better

Author: benjamingrCreated Apr 22, 2018Updated Jul 9, 2026
Labelsgood first issuechromiumconfirmedP3feature

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 1.3.0
  • Platform / OS version: macOS Sierra
  • URLs (if applicable): ...
  • Node.js version: master

What steps will reproduce the problem?

Please include code that reproduces the issue.

  1. Open a new page with puppeteer
  2. Run page.evaluate(() => new Uint8Array(1024 * 1024 * 10)

What is the expected result?

Puppeteer takes over 20 seconds to serialize/deserialize 10MB and the resulting object is not a Uint8Array.

What happens instead?

A Uint8Array should be returned and it should take a reasonable amount of time (single-digit miliseconds tops and not seconds).


This basically would require inspecting objects returned from evaluate, detecting they're Uint8Arrays and then serializing them differently.