<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-bug-was-in-my-benchmark-attaching-a-debugger-to-chromium-throttles-fetch-uploads-20x-igiwe4bwc" -->

---
title: The Bug Was in My Benchmark: Attaching a Debugger to...
description: A file-storage engineer chasing a browser upload speed mystery discovered that attaching a CDP debugger (via Playwright or Puppeteer automation) throttles...
canonical: https://daily.dev/posts/the-bug-was-in-my-benchmark-attaching-a-debugger-to-chromium-throttles-fetch-uploads-20x-igiwe4bwc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Bug Was in My Benchmark: Attaching a Debugger to Chromium Throttles fetch() Uploads 20x | daily.dev
og:description: A file-storage engineer chasing a browser upload speed mystery discovered that attaching a CDP debugger (via Playwright or Puppeteer automation) throttles...
og:url: https://daily.dev/posts/the-bug-was-in-my-benchmark-attaching-a-debugger-to-chromium-throttles-fetch-uploads-20x-igiwe4bwc
og:image: https://api.daily.dev/og/posts/IgiWe4Bwc.png
og:image:alt: The Bug Was in My Benchmark: Attaching a Debugger to Chromium Throttles fetch() Uploads 20x
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Bug Was in My Benchmark: Attaching a Debugger to Chromium Throttles fetch() Uploads 20x

**[Medium](https://daily.dev/sources/medium_js)** · 17 min read · 0 upvotes · 0 comments

## Summary

A file-storage engineer chasing a browser upload speed mystery discovered that attaching a CDP debugger (via Playwright or Puppeteer automation) throttles Chromium's fetch() uploads using typed-array (Uint8Array/ArrayBuffer) request bodies by roughly 17-21x, while Blob and ReadableStream bodies are unaffected. Three earlier theories (chunk count, lack of pipelining overlap, no concurrency) were ruled out through careful measurement, and an apparent '5x browser vs .NET' bottleneck turned out to be entirely an artifact of the debugger being attached during automated testing. Hand-driven browser tests without a debugger showed throughput within noise of native .NET clients. A minimal loopback reproduction using puppeteer-core confirms the effect is specific to Chromium/CDP, not Playwright, and reproduces reliably by attaching and detaching a debugger mid-session. The practical fix already shipped was switching upload bodies from Uint8Array to Blob, which is a genuine ~1.3x win in Chromium and avoids Firefox silently corrupting ReadableStream bodies, but the real headline finding is that the measurement tool itself was the dominant confound.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@getcoffer.org/the-bug-was-in-my-benchmark-attaching-a-debugger-to-chromium-throttles-fetch-uploads-20x-32200be931d5>

## Questions this post answers

### Why are my fetch() uploads slow when I test them with Playwright or Puppeteer but fast when I click through the browser by hand?

An attached CDP debugger throttles fetch() upload bodies that are typed arrays (Uint8Array or ArrayBuffer) in Chromium, cutting throughput by roughly 17-21x compared to the same code running with no debugger attached. The effect reproduces identically in Puppeteer and Playwright, meaning it belongs to CDP/Chromium itself, not to either testing framework. Detaching the debugger mid-session, with everything else unchanged, restores full throughput within seconds.

_Anyone chasing browser-automation performance numbers should sanity-check reproductions like this one on daily.dev before trusting a benchmark._

### Does the body type passed to fetch() affect upload speed in Chromium?

Yes, wrapping the same bytes in a Blob instead of a Uint8Array measurably speeds up fetch() uploads in Chromium, roughly 609 to 802 Mbps in hand-driven browser testing against a real server, about a 1.3x improvement. Build the Blob outside any retry closure since Blobs are re-readable while a ReadableStream body is consumed on first attempt and breaks retries. In Firefox the two body types perform identically.

_Developers picking a fetch() body type for large uploads can weigh options like this via daily.dev before locking in an implementation._

### Does Firefox handle a ReadableStream as a fetch() request body correctly?

No, Firefox does not throw an error when given a ReadableStream as a fetch() request body; instead it silently stringifies the object and uploads the literal 23-byte text "[object ReadableStream]" while still returning a 200 response, causing silent upload corruption. Blob is the only body type in comparable testing that is both fast and functionally correct across engines.

_Teams choosing cross-browser upload strategies can track cross-engine gotchas like this on daily.dev before shipping._

## Similar posts on daily.dev

- [I Thought My E2E Tests Were Slow Because of Bad Selectors. I Was Wrong.](https://daily.dev/posts/i-thought-my-e2e-tests-were-slow-because-of-bad-selectors-i-was-wrong--fb8bziaos) · Medium · 0 upvotes · 0 comments
- [The Sidebar That Ate Your RAM: How We Made Bruno Faster for Large API Collections](https://daily.dev/posts/the-sidebar-that-ate-your-ram-how-we-made-bruno-faster-for-large-api-collections-npcfezbj2) · Bruno Blog · 1 upvotes · 0 comments
- [I Throttled My App to Slow 3G. Here's What My Tests Never Caught](https://daily.dev/posts/i-throttled-my-app-to-slow-3g-here-s-what-my-tests-never-caught-uouttd8gb) · DEV · 1 upvotes · 0 comments
- [We deserve a better streams API for JavaScript](https://daily.dev/posts/we-deserve-a-better-streams-api-for-javascript-x39tdohil) · Cloudflare · 75 upvotes · 3 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#performance](https://daily.dev/tags/performance), [#chromium](https://daily.dev/tags/chromium)

[View this post on daily.dev](https://daily.dev/posts/the-bug-was-in-my-benchmark-attaching-a-debugger-to-chromium-throttles-fetch-uploads-20x-igiwe4bwc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Bug Was in My Benchmark: Attaching a Debugger to Chromium Throttles fetch() Uploads 20x","url":"https://daily.dev/posts/the-bug-was-in-my-benchmark-attaching-a-debugger-to-chromium-throttles-fetch-uploads-20x-igiwe4bwc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-bug-was-in-my-benchmark-attaching-a-debugger-to-chromium-throttles-fetch-uploads-20x-igiwe4bwc"},"datePublished":"2026-09-12T08:15:34.955Z","dateModified":"2026-09-12T08:29:14.799Z","description":"A file-storage engineer chasing a browser upload speed mystery discovered that attaching a CDP debugger (via Playwright or Puppeteer automation) throttles...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-bug-was-in-my-benchmark-attaching-a-debugger-to-chromium-throttles-fetch-uploads-20x-igiwe4bwc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,performance,chromium","timeRequired":"PT17M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"The Bug Was in My Benchmark: Attaching a Debugger to Chromium Throttles fetch() Uploads 20x"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-bug-was-in-my-benchmark-attaching-a-debugger-to-chromium-throttles-fetch-uploads-20x-igiwe4bwc#faq","mainEntity":[{"@type":"Question","name":"Why are my fetch() uploads slow when I test them with Playwright or Puppeteer but fast when I click through the browser by hand?","acceptedAnswer":{"@type":"Answer","text":"An attached CDP debugger throttles fetch() upload bodies that are typed arrays (Uint8Array or ArrayBuffer) in Chromium, cutting throughput by roughly 17-21x compared to the same code running with no debugger attached. The effect reproduces identically in Puppeteer and Playwright, meaning it belongs to CDP/Chromium itself, not to either testing framework. Detaching the debugger mid-session, with everything else unchanged, restores full throughput within seconds. Anyone chasing browser-automation performance numbers should sanity-check reproductions like this one on daily.dev before trusting a benchmark."}},{"@type":"Question","name":"Does the body type passed to fetch() affect upload speed in Chromium?","acceptedAnswer":{"@type":"Answer","text":"Yes, wrapping the same bytes in a Blob instead of a Uint8Array measurably speeds up fetch() uploads in Chromium, roughly 609 to 802 Mbps in hand-driven browser testing against a real server, about a 1.3x improvement. Build the Blob outside any retry closure since Blobs are re-readable while a ReadableStream body is consumed on first attempt and breaks retries. In Firefox the two body types perform identically. Developers picking a fetch() body type for large uploads can weigh options like this via daily.dev before locking in an implementation."}},{"@type":"Question","name":"Does Firefox handle a ReadableStream as a fetch() request body correctly?","acceptedAnswer":{"@type":"Answer","text":"No, Firefox does not throw an error when given a ReadableStream as a fetch() request body; instead it silently stringifies the object and uploads the literal 23-byte text \"[object ReadableStream]\" while still returning a 200 response, causing silent upload corruption. Blob is the only body type in comparable testing that is both fast and functionally correct across engines. Teams choosing cross-browser upload strategies can track cross-engine gotchas like this on daily.dev before shipping."}}]}
```

