Make Python Run Faster
hungyuling.com
hungyuling.com
https://pypi.org/project/viztracer/
python3 viztracer my_script.py arg1 arg2
Then when you exit, it'll do some processing and tell you exactly the vizviewer command you need to run. It opens a webgui and you can drill in to see which of your functions are taking too long. Then you know what you need to optimize.