Skip to content

perf: remove spare Chrome renderers and preserve feature overrides - #3130

Open
antonvishal wants to merge 4 commits into
browserbase:mainfrom
antonvishal:vishal/perf-chrome-memory-flags
Open

antonvishal wants to merge 4 commits into
browserbase:mainfrom
antonvishal:vishal/perf-chrome-memory-flags

Conversation

@antonvishal

@antonvishal antonvishal commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Why

Local browser runs used about 8.4% less memory after disabling Chrome's spare renderer.

Metric Before After
Wall time 10.92 s 9.97 s
Flow p50 300 ms 288 ms
Session p50, including launch and cleanup 1,323 ms 1,220 ms
Browser CPU seconds 53.06 49.77
Peak browser RSS 4,700 MB 4,305 MB
Failures 0/96 0/96

Medians of three local runs, each with 32 billing flows and four browsers. Zero failures.

Custom feature flags also replaced required defaults, including WebMCP flags.

What

Disable the spare renderer and merge feature lists consistently in TypeScript, Python and Go. Caller settings win for the same feature.

Custom feature lists now merge with defaults. To replace a default list entirely, remove its exact flag with ignoreDefaultArgs, or set ignoreDefaultArgs: true.

How

1,172 extension/TypeScript tests and 98 Python launch tests passed. Go launch tests, builds and extension typecheck passed.


Summary by cubic

Reduces local-browser memory by disabling Chrome's spare renderer and preserves defaults when merging caller feature flags.

  • Adds SpareRendererForSitePerProcess to the default disabled features; median peak browser RSS fell 8.4% (4,700 → 4,305 MB) across three local runs with all 96 flows passing.
  • Merges caller --enable-features/--disable-features lists with defaults consistently in TypeScript, Python, and Go; caller entries override earlier feature variants, including parameter, trial, and whitespace differences.
  • Replaces a default feature list entirely only when its exact flag is ignored via ignoreDefaultArgs, or with ignoreDefaultArgs: true; docs now cover this.
  • Syncs the Go SDK's extension protocol version to match the current extension bundle.

Written for commit 1edae67. Summary will update on new commits.

View guided diff

@changeset-bot

changeset-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1edae67

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@browserbasehq/stagehand Patch
@browserbasehq/stagehand-go Patch
@browserbasehq/stagehand-python Patch
browse Patch
@browserbasehq/stagehand-examples Patch
@browserbasehq/stagehand-integrations-claude-cua-sdk Patch
@browserbasehq/stagehand-integrations Patch
@browserbasehq/eve Patch
@browserbasehq/stagehand-integrations-gemini-cua-sdk Patch
@browserbasehq/stagehand-integrations-example-pi-facade Patch
@browserbasehq/stagehand-integrations-claude-agent-sdk Patch
@browserbasehq/stagehand-integrations-example-claude-code-facade Patch
@browserbasehq/stagehand-integrations-codex-sdk Patch
@browserbasehq/stagehand-integrations-example-codex-facade Patch
@browserbasehq/stagehand-integrations-cursor-sdk Patch
@browserbasehq/stagehand-integrations-example-cursor-facade Patch
@browserbasehq/stagehand-integrations-deepagents-sdk Patch
@browserbasehq/stagehand-integrations-eve-sdk Patch
@browserbasehq/stagehand-integrations-fx-sdk Patch
@browserbasehq/stagehand-integrations-mastra-sdk Patch
@browserbasehq/stagehand-integrations-example-mastra-facade Patch
@browserbasehq/stagehand-integrations-pi-sdk Patch
@browserbasehq/stagehand-integrations-example-vercel-ai-facade Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run.
Approving the latest commit mirrors it into an internal PR owned by the approver.
If new commits are pushed later, the internal PR stays open but is marked stale until someone approves the latest external commit and refreshes it.

@github-actions github-actions Bot added external-contributor Tracks PRs mirrored from external contributor forks. external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. labels Oct 7, 2026
@antonvishal
antonvishal marked this pull request as ready for review October 7, 2026 16:17
@antonvishal
antonvishal requested a review from a team as a code owner October 7, 2026 16:17
…memory-flags

# Conflicts:
#	packages/sdk-go/internal/extensionassets/stagehand-extension.zip
…erf-chrome-memory-flags

# Conflicts:
#	packages/sdk-go/internal/extensionassets/stagehand-extension.zip

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. external-contributor Tracks PRs mirrored from external contributor forks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant