scrapy
scrapy copied to clipboard
Write a topic on tuning Scrapy performance
Cover how to identify a bottleneck (network input/output, CPU, disk I/O, memory) and how to improve Scrapy’s performance for any given bottleneck.
Cover PYTHONOPTIMIZE
where relevant, but:
- Explain that
PYTHONOPTIMIZE=2
(-OO
) cannot be used with Scrapy, as scrapy indirectly depends on pycparser (scrapy → cryptography → cffi → pycparser), which does not support this optimization level (their README explains why). - When covering
PYTHONOPTIMIZE=1
(-O
), be realistic about potential gains.
Related: https://github.com/scrapy/scrapy/pull/5566