Repository navigation
[Feature Request]: Lightweight HTTP-only crawling mode via DOM AST pruning (no browser required) #2355
dong7812
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What needs to be done?
Add an optional HTTP-only crawling strategy that fetches pages via plain HTTP and prunes the DOM AST directly — without launching a Playwright browser instance.
The strategy would:
New class:
AsyncHTTPCrawlerStrategyas a sibling to the existingAsyncPlaywrightCrawlerStrategyWhat problem does this solve?
For static and SSR-rendered pages (~60–70% of real-world crawl targets), spinning up a Playwright browser adds substantial overhead:
There's currently no way to opt out of the browser layer even when JavaScript rendering isn't needed. This blocks Crawl4AI from being used in high-throughput, resource-constrained pipelines (serverless, edge, batch RAG ingestion).
Target users/beneficiaries
Current alternatives/workarounds
normalization, and async dispatcher
the full browser startup cost
Benchmark from a reference implementation using the same DOM AST approach:
Parse time: ~11ms/page vs ~300ms Playwright cold start.
Reference: https://github.com/dong7812/dompruner-mcp
Proposed approach
New strategy class
AsyncHTTPCrawlerStrategyin async_crawler_strategy.pyPlug into the existing pipeline unchanged:
Opt-in via config:
crawler_config = CrawlerRunConfig(crawler_strategy="http")
Foreseeable challenges:
→ document clearly; auto-fallback to Playwright could be a follow-up
Success metric: same Markdown output quality as Playwright for static pages, with ≥10x reduction in memory footprint and ≥5x reduction in per-page latency.
Happy to prototype a PR targeting the develop branch.
All reactions