V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
Dustyposa
V2EX  ›  Python

如何加速 Python 的 import 模块的速度

  •  
  •   Dustyposa · 2019-08-20 16:46:33 +08:00 · 1807 次点击
    这是一个创建于 1682 天前的主题,其中的信息可能已经有所发展或是发生改变。

    有一个模块,每次导入需要 1s 多,有没有办法加速导包呢?
    利用的
    python3.7 -X importtime -c "import mmmmm" 查看的导包时间

    2 条回复    2019-08-26 09:53:48 +08:00
    qazwsxkevin
        1
    qazwsxkevin  
       2019-08-21 15:38:53 +08:00
    没有人有 comment?
    我也是大龄初学的,路过......
    弱弱地回复一下楼主,这个好像是换猛一点 CPU 的电脑就能解决的问题吧?!
    Dustyposa
        2
    Dustyposa  
    OP
       2019-08-26 09:53:48 +08:00
    @qazwsxkevin = - 这。。。。。 不能解决根本问题呀 我丢的服务器呢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1017 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:25 · PVG 03:25 · LAX 12:25 · JFK 15:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.