Use python -X importtime to analyze the start up time based on the time it takes to import modules. Let's see how much we can move into function-level imports to make the initial startup faster. Tools like tuna can analyze the importtime output, and there are also other profilers, including memray, that may show additional places for speedup.
Use
python -X importtime
to analyze the start up time based on the time it takes to import modules. Let's see how much we can move into function-level imports to make the initial startup faster. Tools liketuna
can analyze theimporttime
output, and there are also other profilers, including memray, that may show additional places for speedup.