AI Bot commited on
Commit
0b14ba9
·
1 Parent(s): a7bac51

Increase max_workers to 50 for faster parallel crawling

Browse files
Files changed (1) hide show
  1. src/crawler.py +2 -2
src/crawler.py CHANGED
@@ -342,8 +342,8 @@ class Crawler:
342
  logger.info(f"Starting crawl for domain: {base_domain}")
343
 
344
  # Use ThreadPoolExecutor for parallel crawling with high concurrency
345
- # Adjusted to 20 for HuggingFace Spaces (2 vCPU usually) to avoid context switching overhead
346
- with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor:
347
  # Map of future -> url
348
  future_to_url = {}
349
 
 
342
  logger.info(f"Starting crawl for domain: {base_domain}")
343
 
344
  # Use ThreadPoolExecutor for parallel crawling with high concurrency
345
+ # Adjusted to 50 for much faster I/O bound concurrency
346
+ with concurrent.futures.ThreadPoolExecutor(max_workers=50) as executor:
347
  # Map of future -> url
348
  future_to_url = {}
349