4 ms·
This would be a huge deal for Python startup time *if* it was applied to all the standard library packages recursively. Right now importing asyncio brings in ha
by dataangel 1y ago
This would be a huge deal for Python startup time *if* it was applied to all the standard library packages recursively. Right now importing asyncio brings in half the standard library through transitive imports.
- zahlman 1y agoIt's bad, but it's not that bad. $ time python -c '' # baseline real 0m0.020s user 0m0.015s sys 0m0.005s $ time python -c 'import sys; old = len(sys.modules); import asyncio; print(len(sys.modules) - old)' 104 real 0m0.076s user 0m0.067s sys 0m0.009s For comparison, with the (seemingly optimized) Numpy included with my system: $ time python -c 'import sys; old = len(sys.modules); import numpy; print(len(sys.modules) - old)' 185 real 0m0.124s user 0m0.098s sys 0m0.026s