Obscura vs Headless Chrome: Benchmarks for AI Agents


Obscura took 8.9 seconds to load Amazon’s laptop search. Headless Chrome took under one second on the same page. Both numbers are medians of three runs of the same Playwright script on the same laptop.

I went in expecting the opposite. Obscura is a headless browser written in Rust, pitched as “the open-source headless browser for AI agents and web scraping.” Its README puts a table near the top: 30 MB of memory against 200+ MB for headless Chrome, 85 ms page loads against about 500 ms, startup “instant” against about 2 seconds, plus built-in anti-detection. It has around 37,800 GitHub stars after seven months, and the README says it inspired the first prototype of Cloudflare’s agent browser, Kitesurf. If those numbers held, it would be an easy swap for anyone running browser agents at scale.

So I built it and benchmarked Obscura against headless Chrome on the kind of pages an agent visits.

How I tested Obscura with Playwright

I cloned the repo at commit efe1c95 (release v0.2.7 is the latest tag) and built it from source on an Apple Silicon Mac with Rust 1.96.1:

cargo build --release -p obscura-cli --bins --features render

It finished in 3 minutes 23 seconds, faster than the README’s “~5 min” estimate. The output is two binaries: obscura at 108 MB and obscura-worker at 97 MB. The README’s “~70 MiB” figure probably refers to a compressed or stripped release archive. I didn’t check.

For the comparison I wrote one Playwright script (playwright-core 1.65.1) and pointed it at both engines. For Obscura it connected over CDP to obscura serve. For Chrome it launched chrome-headless-shell, the headless Chrome build that Playwright ships, which I call Chromium from here on. The testing came in two passes. The first checked that each engine got the page right: load it, wait one second so single-page apps can hydrate, then run a small check in the page, like counting the Hacker News story links, counting the JS-rendered quotes or reading the React docs <h1>. It ended with three tasks shaped like agent work: log in to a form and click to the next page, add and check off items in TodoMVC, and take a screenshot. The second pass measured speed and memory. It loaded the same 12 sites in a fresh browser context each, timing goto with waitUntil: 'load', three times per engine and alternating between them. The charts below show the medians from that second pass.

I used the default build, so Obscura’s --stealth mode (a separate compile feature) wasn’t on.

Obscura vs headless Chrome on 12 real sites

Sort by
example.comObscura 74 msChromium 191 ms117 ms faster

Checked: page title. Obscura: "Example Domain". Chromium: "Example Domain".

Hacker NewsObscura 2.1 sChromium 1.5 s580 ms slower

Checked: story links on the front page. Obscura: 30. Chromium: 30.

quotes.toscrape.com/jsObscura 3.1 sChromium 1.9 s1.2 s slower

Checked: quotes rendered by JavaScript. Obscura: 10. Chromium: 10.

books.toscrape.comObscura 4.2 sChromium 2.0 s2.2 s slower

Checked: product cards. Obscura: 20. Chromium: 20.

Wikipedia articleObscura 3.1 sChromium 1.4 s1.7 s slower

Checked: characters of body text. Obscura: 28,914. Chromium: 28,694.

react.devObscura 2.5 sChromium 937 ms1.6 s slower

Checked: text of the first <h1>. Obscura: "React". Chromium: "React".

GitHub repo pageObscura 4.6 sChromium 1.8 s2.8 s slower

Checked: characters in the rendered README. Obscura: 19,454. Chromium: 18,518.

vercel.comObscura 3.6 sChromium 1.5 s2.1 s slower

Checked: characters of body text. Obscura: 2,524 (likely includes hidden text, see below). Chromium: 620.

Amazon searchObscura 8.9 sChromium 960 ms8.0 s slower

Checked: search result cards. Obscura: 16. Chromium: 16.

Google searchObscura 4.4 sChromium 4.2 sabout even

Checked: result headings. Obscura: 0, no results page. Chromium: 0, no results page.

bot.sannysoft.comObscura 3.0 sChromium 2.7 s267 ms slower

Checked: failed fingerprint checks. Obscura: 3, navigator.webdriver = false. Chromium: 12, navigator.webdriver = true.

TodoMVCObscura 1.2 sChromium 464 ms719 ms slower

Checked: React app mounted. Obscura: yes. Chromium: yes.

Median of 3 runs per engine, alternating, same Playwright script. Time runs from goto to the load event, in a fresh browser context per page. Click a row to see what was checked and what each engine returned (content checks from my first run).

Sort by “Obscura’s worst first” and Amazon jumps to the top, almost 8 seconds behind. The three agent tasks went like this. Both engines added two TodoMVC items, checked one off and read back “1 item left.” Both took a screenshot (64 KB from Obscura, 79 KB from Chromium). Logging in and then clicking “Next” worked on Chromium and timed out on Obscura, which gets its own section below.

Obscura got the right content on every page it loaded. Hacker News, the JS-rendered quotes, the Wikipedia text and the GitHub README all came back complete, and React, Vercel and TodoMVC all mounted. A Rust browser engine that isn’t Chromium executing modern React correctly is a real engineering achievement, and it’s the main reason I’d take this project seriously.

It beat Chromium on example.com, 74 ms against 191 ms, tied on Google, and came within about 10% on the fingerprinting page. Everywhere else it was slower: 1.4x on Hacker News, between 1.6x and 2.7x on quotes.toscrape, books.toscrape, Wikipedia, react.dev, GitHub, Vercel and TodoMVC, and about 9x on Amazon.

Neither engine got a Google results page. On bot.sannysoft.com, Obscura failed 3 fingerprint checks to Chromium’s 12 and reported navigator.webdriver as false, without stealth mode turned on. Against a simple fingerprinting page it does better out of the box. Against Google it didn’t help.

Obscura memory usage vs Chrome

My first pass had Obscura peaking at 876 MB, above Chrome, while every other review I found had it far lighter. I had measured the two engines differently that time, so I reran it properly: three runs per engine, alternating, a fresh browser context for every page, and memory read the same way for both, as the total of the browser’s whole process tree sampled every 250 ms.

Sort by
example.comObscura 33 MBChromium 293 MB260 MB less

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 33 MB. Chromium: 293 MB.

Hacker NewsObscura 42 MBChromium 294 MB252 MB less

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 42 MB. Chromium: 294 MB.

quotes.toscrape.com/jsObscura 46 MBChromium 309 MB263 MB less

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 46 MB. Chromium: 309 MB.

books.toscrape.comObscura 78 MBChromium 318 MB240 MB less

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 78 MB. Chromium: 318 MB.

Wikipedia articleObscura 154 MBChromium 350 MB196 MB less

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 154 MB. Chromium: 350 MB.

react.devObscura 193 MBChromium 372 MB179 MB less

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 193 MB. Chromium: 372 MB.

GitHub repo pageObscura 283 MBChromium 492 MB209 MB less

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 283 MB. Chromium: 492 MB.

vercel.comObscura 379 MBChromium 522 MB143 MB less

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 379 MB. Chromium: 522 MB.

Amazon searchObscura 826 MBChromium 383 MB443 MB more

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 826 MB. Chromium: 383 MB.

Google searchObscura 804 MBChromium 504 MB300 MB more

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 804 MB. Chromium: 504 MB.

bot.sannysoft.comObscura 793 MBChromium 534 MB259 MB more

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 793 MB. Chromium: 534 MB.

TodoMVCObscura 680 MBChromium 492 MB188 MB more

Checked: memory of the whole browser process tree while this page was open, after every earlier page had been closed. Obscura: 680 MB. Chromium: 492 MB.

Median of 3 runs. Each bar is the peak memory of the whole browser process tree (every helper process summed, the same way for both engines) while that page was open. Pages ran in order in one browser, each in its own context that was closed before the next, so the bars show what each engine still holds as a session goes on.

The rerun confirmed the high number and explained the gap with everyone else. Obscura idles at 23 MB against Chrome’s 147 MB, and on light pages it stays far below Chrome: 33 MB on example.com, 78 MB by books.toscrape, 154 MB at Wikipedia, while Chrome sits around 300 to 350 MB. Then it climbs with every page, even though each context is closed before the next one opens, and Amazon pushes it to a median of 826 MB against Chrome’s 383. After the last page closes, Obscura still holds 676 MB and Chrome 385.

It doesn’t look like a plain leak. When I ran the same 12 sites twice through one server, the second lap started around 530 MB and peaked at 866 MB, a little above the first lap’s 786, instead of doubling. Obscura keeps the memory after a page closes and reuses it for the next one. Amazon is the expensive page: a fresh obscura fetch of the results peaked at 683 and 691 MB in two runs. On a third run Amazon served a short 1,390-character page instead of results, and Obscura used 114 MB.

So the README’s 30 MB is real for a light page in a fresh process, and it matches the per-task numbers other benchmarks report. A long-running Obscura server that touches a heavy page will sit at several hundred MB from then on. If you run it as a service, obscura serve has --worker-max-age and, on Linux, --worker-max-rss to recycle workers before that adds up.

Is Obscura faster than Chrome?

The headline figures make more sense from the command line. obscura fetch loads one page and exits, and I timed it against chrome-headless-shell --dump-dom on three URLs:

Sort by
example.comObscura 130 msChromium 230 ms100 ms faster

Checked: Obscura peak memory. Obscura: 30 MB RSS. Chromium: not measured.

Hacker NewsObscura 2.3 sChromium 1.9 s450 ms slower

Checked: Obscura peak memory. Obscura: 37 MB RSS. Chromium: not measured.

Wikipedia articleObscura 4.0 sChromium 1.3 s2.6 s slower

Checked: Obscura peak memory. Obscura: 152 MB RSS. Chromium: not measured.

Median of 3 runs. One page load, then exit: obscura fetch --dump text against chrome-headless-shell --dump-dom. Obscura adds an adaptive settling wait of up to 5 s by default, which may inflate its Hacker News and Wikipedia times.

On example.com the README’s claims hold. 30 MB is exactly what it used, and it finished in 130 ms against Chromium’s 230. Hacker News and Wikipedia went the other way, Wikipedia by 3x. One caveat in Obscura’s favor: fetch has an adaptive settling wait of up to 5 seconds after load by default, which may account for part of its time on those two. Even so, the 85 ms versus 500 ms comparison describes static pages, and agents mostly don’t spend their time on those.

Obscura vs Lightpanda and Chrome in other benchmarks

I only tested Obscura against Chrome, so I looked for larger runs to check my numbers against. Two line up with what I saw, and a third explains one of my odd results.

Obscura’s own benchmark repo leads with framework fixtures where it’s about 21x faster than Chrome. Its real-world corpus of 98 live sites tells the story I got: a median latency of 5.2 s for Obscura against 2.1 s for headless Chrome. It also rendered more of those sites (94 against 85) at a median of 64.2 MB peak memory against Chrome’s 201.2 MB.

Lexbench drives each engine through real client stacks (Playwright, Puppeteer, Selenium and agent tooling) across 1,928 tasks. Chrome passed all of them. Lightpanda, another engine built for agents, passed 81.4%, and Obscura 0.2.4 passed 60.2%. On memory the picture flips: median peak memory per task was 34 MiB for Lightpanda, 45 MiB for Obscura and 734 MiB for Chrome. The authors flag that round as indicative, since Obscura’s Fetch interception tasks flipped between pass and fail across runs.

Jacar’s Lightpanda vs Obscura comparison also explains an odd row in my chart. On vercel.com, Obscura returned 2,524 characters of body text to Chromium’s 620. Jacar saw the same thing at a bigger scale on GitHub, 111,970 characters from Obscura against 14,449 from Chrome, which points to Obscura counting text that Chrome treats as hidden. If your agent reads innerText, that’s extra noise in its context window.

Put together, Obscura uses far less memory than Chrome on light pages, loads real sites more slowly, and fails a meaningful share of the automation calls that Chrome handles every time. My one stuck click is a small sample of that last number.

A Playwright click that never landed

The one outright failure came in the most agent-like test. On quotes.toscrape.com, Obscura filled the login form, submitted it, followed the redirect, and kept the session cookie. The logout link was there afterward. Then Playwright tried to click the “Next →” link and waited 30 seconds:

2 × waiting for element to be visible, enabled and stable

Obscura reported a bounding box for the link (x: 736, y: 1591, width: 84, height: 35), but Playwright’s actionability check never passed. I tried it again on a fresh page with no login first and got the same failure. The same kind of click worked on books.toscrape’s “next” link, Hacker News’s “More” link and a Wikipedia table-of-contents link.

That’s one link on one site, but it shows the risk with an engine that isn’t Chromium. Playwright and Puppeteer assume Chrome’s layout, hit-testing and event behavior. Obscura reimplements all of that, so a small difference becomes an agent that hangs on a button, and nothing in the error tells you the browser is the cause. The server log turned up other gaps along the way: importScripts is not defined in a worker and navigator.getUserMedia is not a function on the fingerprinting page. The README says so itself: long-tail CSS and some Web APIs “may differ from Chromium.”

Obscura’s MCP server has 38 tools, not 14

The best part of Obscura for agents isn’t the speed. obscura mcp starts a Model Context Protocol server over stdio from the same binary. The README lists 14 tools. When I connected and called tools/list, I got 38, including browser_markdown, browser_interactive_elements, browser_detect_forms, browser_fill_form, tab management, and cookie and storage-state import and export.

The page snapshots are compact. browser_snapshot on Hacker News returned 4,146 characters, about 1,000 tokens, with a reference for every element an agent can act on. Switch between the three pages I snapshotted:

Page

Full snapshot: 4,146 characters, about 1,037 tokens, returned in 25 ms

URL: https://news.ycombinator.com/
Title: Hacker News

ref=e1-1 a "" role=link
ref=e1-2 a "Hacker News" role=link
ref=e1-3 a "new" role=link
ref=e1-4 a "past" role=link
ref=e1-5 a "comments" role=link
ref=e1-6 a "ask" role=link
ref=e1-7 a "show" role=link
ref=e1-8 a "jobs" role=link
ref=e1-9 a "submit" role=link
ref=e1-10 a "login" role=link
ref=e1-11 a "" role=link
ref=e1-12 a "Google's DeepCrossAttention achieves comparable model quality up to 3x faster" role=link
ref=e1-13 a "research.google" role=link
ref=e1-14 a "ComputedCamp995" role=link
ref=e1-15 a "5 hours ago" role=link
ref=e1-16 a "79 comments" role=link
…

Full snapshot: 1,742 characters, about 436 tokens, returned in 22 ms

URL: https://quotes.toscrape.com/js/
Title: Quotes to Scrape

ref=e2-1 a "Quotes to Scrape" role=link
ref=e2-2 a "Login" role=link
ref=e2-3 a "Next" role=link
ref=e2-4 a "GoodReads.com" role=link
ref=e2-5 a "Zyte" role=link
Quotes to Scrape

Login

“The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.”by Albert Einstein
Tags: change deep-thoughts thinking world

“It is our choices, Harry, that show what we truly are, far more than our abilities.”by J.K. Rowling
Tags: abilities choices
…

Full snapshot: 4,174 characters, about 1,044 tokens, returned in 93 ms

URL: https://en.wikipedia.org/wiki/Web_scraping
Title: Web scraping - Wikipedia

ref=e3-1 a "Jump to content" role=link
ref=e3-2 input "Main menu" role=button type="checkbox" checked=false
ref=e3-17 a "Wikipedia The Free Encyclopedia" role=link
ref=e3-19 input "Search Wikipedia" role=searchbox type="search" name="search"
ref=e3-20 button "Search" role=button
ref=e3-22 a "Donate" role=link
ref=e3-23 a "Create account" role=link
ref=e3-24 a "Log in" role=link
ref=e3-30 button "Hide Contents" role=button
ref=e3-31 a "(Top)" role=link
ref=e3-32 a "History" role=link
ref=e3-33 a "Techniques" role=link
ref=e3-34 button "Toggle Techniques subsection" role=button
…
The opening lines of what an agent receives from browser_snapshot. Everyref can be passed straight to browser_click or browser_fill. Token counts use the rough 4-characters-per-token rule.

Snapshots took 22 to 93 ms once the page had loaded. I ran the same login flow through MCP with browser_fill, browser_click and browser_evaluate, and it landed on the logged-in page with the logout link present. Screenshots came back as an MCP image in 67 ms.

Obscura also blocks requests to private and internal IP addresses by default, and you have to pass --allow-private-network to reach localhost. A browser that a language model steers should ship with this on. An agent that reads a prompt injection telling it to fetch http://169.254.169.254/ gets refused.

A single binary with no Chrome or Node.js install, an MCP server built in, and ~1k-token snapshots make a good setup for a coding agent that needs to read docs or fill in a simple form. I’d use it for that.

When to use Obscura instead of headless Chrome

For a production agent that has to work on whatever site a user names, I’d stay on Chromium. In my runs it was faster on every heavy page, used less memory than Obscura once a heavy page had loaded, and its clicks landed. Lexbench found the same reliability gap at a much larger scale. A browser agent’s worst failures are silent hangs, and an independent engine adds a new place for them to come from.

Obscura makes sense in narrower cases. Pick what your agent does and I’ll tell you which one I’d run:

What is your agent doing?

Pick one to see which browser I'd use.

Chromium

Chromium was faster on every heavy page I tried (react.dev, GitHub, Amazon), used less memory than Obscura once a heavy page had loaded, and every click landed. Obscura hung on a plain "Next" link, and a hang like that is hard to trace back to the browser.

Obscura

One binary, no Chrome or Node.js install, 38 MCP tools, and snapshots around 1k tokens with clickable refs. The login flow worked end to end through MCP.

Obscura

This is where the README numbers hold: 130 ms and 30 MB on example.com, against 230 ms for Chromium (medians of 3 runs). Check your own pages first, since Hacker News and Wikipedia were slower than Chromium.

Obscura, after testing your sites

You skip the Chromium build and its system libraries. Test your target sites first, because Web API gaps like importScripts in workers showed up in the logs.

Neither, in my tests

Obscura passed 9 more fingerprint checks than headless Chromium on bot.sannysoft.com, but Google served neither of them a results page. I did not test the separate --stealth build.

The project is also young. It’s 205,000 lines of Rust across 11 crates written in about seven months, and 62 of the 68 commits in my shallow clone came from one author. The largest single file, the JavaScript runtime, is just under 30,000 lines. It moves fast, but that’s a lot of browser to trust on one maintainer’s review. I’d check it again in six months, and I’d start with that “Next” link.