Skip to content

perf: optimize browser pipeline — tab query dedup, parallel stealth, incremental snapshots#713

Merged
jackwener merged 2 commits intomainfrom
perf/browser-pipeline-optimizations
Apr 2, 2026
Merged

perf: optimize browser pipeline — tab query dedup, parallel stealth, incremental snapshots#713
jackwener merged 2 commits intomainfrom
perf/browser-pipeline-optimizations

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

  • resolveTab() returns { tabId, tab } instead of just tabId, so handleNavigate skips a redundant chrome.tabs.get() call (~20-50ms saved per navigation)
  • goto() fires stealth JS injection in parallel with the navigate command instead of sequentially (~60-100ms saved per navigation)
  • snapshot() now passes previousHashes from the prior snapshot call, enabling incremental diff marking (new elements marked with *) — reduces LLM token consumption on repeated snapshots

Test plan

  • tsc --noEmit passes (both main and extension)
  • Unit tests pass (21/21)
  • Manual: verify goto() still navigates correctly with stealth injection
  • Manual: verify consecutive snapshot() calls mark new elements with *

…incremental snapshots

- resolveTab() now returns { tabId, tab } so handleNavigate skips redundant chrome.tabs.get()
- goto() fires stealth injection in parallel with navigation instead of sequentially
- snapshot() passes previousHashes to enable incremental diff marking on consecutive calls
@jackwener jackwener merged commit 5fe081b into main Apr 2, 2026
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant