Yes, Python is Slow, and I Don’t Care
Nick Humrich
2.1K69

I’m an operator and heavy python user. I believe you ignore nuances when saying that speed does not matter.

It does not matter for long, non-interactive tasks. If you have your script murmuring something in background it does not matter if it done is 340 seconds even 550 seconds.

But if you are working with interactive tasks, speed translates into latency, which in turn become responsivness of the things you do.

My best (the worst I knew!) example of ‘slow python’ is openstack client (python-openstackclient). It takes 2 megabytes of syscalls list just to show image list. It includes 4 (four!) execs, thousands of reads. It takes 2 seconds to make two HTTP REST calls (each served by python on other side of network, both done in less than 200 ms). Python starts, reads file, than reads all imports, than the code read internal variables and call for plugin manager, than plugin manager scans all modules in a folder and process all files in all folders, than module decide whom to import and python read those files again and process them, then those modules import modules again and again… Whole strace for openstack leaves with uncanny sense of helplessness in that flood of imports and ‘lisence rereads’.

Yes, it is convenient to write in python with those fancy plugin managers and imports, but it’s really suck to use it.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.