推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
hunk
V2EX  ›  Python

Future 多线程用 urllib 抓取的优化

  •  
  •   hunk · Feb 17, 2021 · 1597 views
    This topic created in 2046 days ago, the information mentioned may be changed or developed.
    exsi 虚拟机分配 8 核 cpu,8G 内存。
    Future 使用 8 线程,50 多万条链接,有些无效链接。
    一下子添加任务,运行一段时间后会被因内存不足被杀死,无奈只好每隔 0.3 秒添加一个任务。
    请问还有啥办法好优化提高速度不?
    northisland
        1
    northisland  
       Feb 18, 2021
    抓取的结果,放硬盘,还是内存?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2358 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 05:33 · PVG 13:33 · LAX 22:33 · JFK 01:33
    ♥ Do have faith in what you're doing.