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

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -