← Back to context

Comment by kzrdude

8 years ago

35ms for Python is ok. What we see in reality is that the imports that a real application will use, adds a whole lot more time.

For example, if you want a snappy command line response for a Gtk-using Python program, you probably want to handle command line arguments before even importing Gtk. Maybe it is --help or an argument that you pass on to another running instance, and you want it to be absolutely snappy and fast.

I have read that conditional imports are "un-pythonic", but I tend to do exactly that in order to keep resource usage lower.