Speeding up Python Imports -


i have large program structured using object oriented techniques, , have 1 main driver module imports bunch of other classes, in turn import more python built-in modules or other classes. there on 250 from x import y statements (i don't have control on part of code), duplicates in other classes , unique. profiled code , suspected majority of time in start import many modules , classes. there way speed this?

you can move import statements inside functions reduce initial startup.

another technique copy modules ramdisk or tmpfs faster io (these use ram, runs faster).


Comments

Popular posts from this blog

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -