Reducing Python's startup time | Hacker News

Hacker News new | comments | show | ask | jobs | submit login Reducing Python's startup time ( lwn.net ) 37 points by vanni 1 hour ago | hide | past | web | 7 comments | favorite mikepurvis 30 minutes ago One of the comments below the article mentions this, but in my experience on Linux and Mac, by far the biggest culprit is pkg_resources and its nasty habit of spidering the filesystem: https://github.com/pypa/setuptools/issues/926 There are hacks to get around it, but it's a deep hole. reply orf 8 minutes ago People often complain that using `entry_points` in setup.py is slow. I did some profiling and it came down to it importing some `pip` submodule (pip.vendor.something), which imported basically the whole of pip. :( reply sillysaurus3 27 minutes ago $ time python -c 'print(1)' 1 real 0m0.067s user 0m0.015s sy...

Linked on 2017-08-30 15:47:34 | Similar Links