I want to know how much time an import takes for both built-in as well as user defined modules.
Starting from Python3.7 releaese, new -X importtime
option is available.
To measure import time, just simply execute your script with that option, e.g. python -X importtime my_script.py
.
For reference:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With