"Optimize Python imports with importtime module"

#Python tip of the day Got a slow import? You can trace it with the "importtime" module[1] (batteries included) and visualize those results with a project by kmichel[2]. For instance, I was curious about import times for #cvxpy. [1]: python -X importtime $MODULE 2> importtime.txt [2]: https://lnkd.in/dB4dcz-p

  • chart, treemap chart

This is really convenient. Thanks for sharing I usually use pyinstrument for performance profiling like this: import pyinstrument profiler = pyinstrument.Profiler() profiler.Start() import my_slow_module profiler.Stop()

To view or add a comment, sign in

Explore content categories