The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →The fastest concurrency model depends on what your scraper is waiting for. For network-heavy scraping, overlap requests with an async HTTP client or a thread pool; for CPU-heavy parsing and transformation, move that stage to processes. There is no universal winner: measure the same URLs, limits, Python and library versions, and destination conditions before changing architecture.
Start with the bottleneck: network wait or CPU work?
Profile one representative run before rewriting your scraper. Record total elapsed time, successful pages per second, timeout and retry counts, memory, CPU utilization, and time spent waiting for responses versus parsing documents. A scraper that spends most of its time awaiting DNS, TCP/TLS, server response, or download bytes benefits from concurrency that overlaps those waits. A scraper that spends most of its time extracting, normalizing, decompressing, or running machine-learning code needs CPU parallelism or cheaper parsing.
Keep request rates and concurrency within the destination’s terms and technical limits. More simultaneous requests can increase throttling, failures, memory use, and pressure on the target rather than improving useful throughput.
Choose the model
| Approach | Best fit | Main trade-off | Implementation cue |
|---|---|---|---|
| Async/asyncio | Many network waits, an async-capable client, and an application already using async code | Every operation on the event-loop path must be non-blocking; a blocking call stalls other tasks | Use an async client such as HTTPX AsyncClient and await its methods |
| Threads | Blocking synchronous HTTP libraries or an existing synchronous scraper | Thread coordination and shared-state hazards; ordinary CPython’s GIL limits parallel Python bytecode for CPU-bound work | Submit blocking functions to a thread pool |
| Processes | CPU-heavy parsing or transformation that needs parallel Python execution | Process startup and data-transfer overhead; arguments, results, and callables must be pickleable, and the main module must be importable | Isolate a serializable CPU function in a process pool |
Python’s official concurrency guidance frames the choice around CPU-bound versus I/O-bound work and cooperative event-driven versus preemptive multitasking. Asyncio is a cooperative event-loop scheduler: a task runs until it reaches an await point. A coroutine does not make a synchronous network call non-blocking. Likewise, a process pool is not automatically faster for downloading pages; it is usually most useful after responses arrive.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Async scraping with HTTPX
Async is a strong default when you need to coordinate many requests and can keep the entire request path non-blocking. Reuse one client so connections can be pooled, bound concurrency with a semaphore, set explicit timeouts, and handle failures per URL.
import asyncio
import httpx
URLS = [
"https://example.com/one",
"https://example.com/two",
]
async def fetch(client: httpx.AsyncClient, url: str, limit: asyncio.Semaphore):
async with limit:
try:
response = await client.get(url)
response.raise_for_status()
return {"url": url, "status": response.status_code, "html": response.text}
except httpx.HTTPError as exc:
return {"url": url, "error": str(exc)}
async def main():
limit = asyncio.Semaphore(20)
timeout = httpx.Timeout(30.0, connect=10.0)
async with httpx.AsyncClient(timeout=timeout, follow_redirects=True) as client:
results = await asyncio.gather(
*(fetch(client, url, limit) for url in URLS)
)
for result in results:
print(result["url"], result.get("status", result.get("error")))
if __name__ == "__main__":
asyncio.run(main())
Keep the event loop cooperative
- Do not call a synchronous HTTP library, blocking file operation, or long CPU parser directly inside an async task.
- Replace blocking sleeps with
await asyncio.sleep(). - For unavoidable blocking work, use
await asyncio.to_thread(function, ...)or an executor. - For substantial CPU work, use a process pool and return only compact, serializable results.
An async client improves scheduling, not the remote server’s response time. Connection limits, DNS behavior, TLS setup, server throttling, retries, and your semaphore still determine throughput.
Threads for synchronous scrapers
Threads are the least disruptive upgrade when your parser and HTTP code are synchronous. A worker can wait on a socket while another worker runs. They do not provide ordinary CPython parallelism for CPU-bound Python bytecode because of the GIL, so use them primarily for blocking I/O.
from concurrent.futures import ThreadPoolExecutor, as_completed
import requests
URLS = [
"https://example.com/one",
"https://example.com/two",
]
def fetch(url: str):
try:
response = requests.get(url, timeout=(10, 30))
response.raise_for_status()
return url, response.status_code, response.text, None
except requests.RequestException as exc:
return url, None, None, str(exc)
if __name__ == "__main__":
with ThreadPoolExecutor(max_workers=20) as pool:
futures = [pool.submit(fetch, url) for url in URLS]
for future in as_completed(futures):
url, status, html, error = future.result()
print(url, status or error)
Choose a worker count experimentally. A larger pool can exhaust file descriptors, sockets, memory, or the target’s rate limit. Protect shared output with a queue, lock, or single writer; avoid having threads mutate one shared parser or session unless that library documents the behavior as safe.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Processes for CPU-heavy parsing
Use processes when profiling shows that parsing or transformation, rather than downloading, dominates runtime. ProcessPoolExecutor uses multiple processes to sidestep the GIL, but workers must receive pickleable arguments and return pickleable results. Put pool creation behind if __name__ == "__main__" so the main module can be imported by worker subprocesses.
from concurrent.futures import ProcessPoolExecutor
from bs4 import BeautifulSoup
def parse_title(item):
url, html = item
soup = BeautifulSoup(html, "html.parser")
title = soup.title.get_text(strip=True) if soup.title else None
return {"url": url, "title": title}
if __name__ == "__main__":
pages = [
("https://example.com/one", "<html><title>One</title></html>"),
("https://example.com/two", "<html><title>Two</title></html>"),
]
with ProcessPoolExecutor() as pool:
for result in pool.map(parse_title, pages):
print(result)
Passing complete HTML documents between processes consumes memory and serialization time. Batch work where practical, keep results small, and compare the pool’s total time—including startup and transfer—with a sequential parser.
A hybrid architecture often wins
Separate stages: an async or threaded downloader obtains responses, then a bounded process pool parses only the CPU-heavy subset. Use a queue or bounded batches so downloaded pages do not accumulate without limit. If parsing is light, process-pool overhead can erase any gain; parse in the event-loop process or worker thread instead.
How to measure a fair comparison
- Freeze the URL set, response sizes, parser, extraction rules, retry policy, timeout values, and output format.
- Run sequential, async, threaded, and (where relevant) process versions in the same environment and with the same concurrency or worker limit.
- Warm up once, then collect several runs. Record elapsed time, successful pages per second, errors, retries, peak memory, CPU utilization, and network-wait versus parse time.
- Check result equivalence. A faster run that silently drops pages or changes retry behavior is not an improvement.
- Increase concurrency gradually until throughput stops improving or errors, memory, or rate limiting rise. Keep the setting that meets your reliability and policy requirements.
No generally applicable speedup percentage or maximum worker count is established here. Results depend on target latency, response size, local CPU, network, library versions, and server behavior.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Reliability and production controls
Timeouts and retries
Set separate connect and read timeouts. Retry only transient failures, use exponential backoff with jitter, and cap attempts. Do not retry authentication failures, invalid URLs, or permanent HTTP responses indefinitely.
Backpressure and cancellation
Bound in-flight requests with a semaphore, queue, or limited future set. Cancel outstanding tasks when a job is stopped and close clients, sessions, and pools in finally or context managers.
Sessions, cookies, and identity
Reuse connections, but keep per-account cookies and authorization isolated. Respect robots directives, terms, privacy obligations, and explicit rate limits. Concurrency does not bypass bot checks or access controls.
Troubleshooting
Async is no faster than sequential
Look for a synchronous call, blocking parser, excessive semaphore limits, connection setup on every request, or a target that serializes responses. Move blocking work off the loop, reuse one client, and profile wait time.
Recommended Free Tools
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
The event loop freezes
A long CPU function or blocking library is running on the loop thread. Use an executor or process pool, or rewrite the operation with an async-compatible library.
Threads increase errors
Reduce worker count, add bounded retries and backoff, verify thread-safe use of sessions and output, and inspect socket/file-descriptor limits.
Processes fail to start or raise pickling errors
Move pool creation under the main guard, define worker functions at module scope, and pass plain serializable values. Do not send open sockets, locks, nested local functions, or live client objects.
More workers use more memory
Bound queued URLs and response retention, stream or discard bodies after extraction, reduce batch size, and measure peak memory rather than average memory.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallBest Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Fast results contain missing pages
Collect every future or task result, log exceptions, distinguish timeout from HTTP status, and verify that retries and cancellation do not drop work.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
When the job is to capture rendered pages rather than build a browser pipeline, ScreenshotNeo provides a single HTTP request. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.
See the full parameter reference in the ScreenshotNeo documentation. This cURL example captures Stripe as WebP:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo includes full-page and element captures, device presets and custom viewports, retina scale, dark mode, PDFs, custom CSS and JavaScript, clicks, selector waits, delays or network-idle waits, request and resource blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, selectable cache TTLs, signed image links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, a usage API, an OpenAPI specification, and familiar parameter names for easier migration. Every feature is on every plan: 1,000 shots per month free with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
Frequently Asked Questions
Should I use async or threads with an async web framework?
Use the framework’s async flow and an async HTTP client. Offload any unavoidable blocking library to an executor rather than calling it directly on the event loop.
Can a process pool download pages faster?
It can add overhead without helping I/O. Use async or threads for blocking downloads, reserving processes for measured CPU-heavy parsing or transformation.
Does Python’s free-threaded development work change this advice?
Development documentation for Python 3.16.0a0 discusses free-threaded support, but those pre-release, version-specific details should not be generalized to ordinary stable CPython builds.
What should I log in a scraper benchmark?
Log the fixed URL set and environment plus elapsed time, successful pages per second, status and exception counts, retries, memory, CPU, and network-wait versus parsing time.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

