This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients barry, cykerway, methane, ncoghlan, terry.reedy, vstinner
Date 2018-08-06.08:07:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> i did 2 implementations in both python and pure bash, python takes about 500ms to run while bash is more than 10 times faster.

VM startup + `import site` are done in 10~20ms on common Linux machine.
It won't take 500ms.

While Python VM startup is not lightning fast, library import time is much slower than VM startup in many cases.  And since "importing library" may have many important side effects, we can't "pre warm" it.

Have you tried `PYTHONPROFILEIMPORTTIME=1` environment variable added by Python 3.7?
Date User Action Args
2018-08-06 08:07:48methanesetrecipients: + methane, barry, terry.reedy, ncoghlan, vstinner, cykerway
2018-08-06 08:07:47methanesetmessageid: <>
2018-08-06 08:07:47methanelinkissue34296 messages
2018-08-06 08:07:47methanecreate