On Tue, 2007-01-23 at 21:43 +0100, Dirk Meyer wrote: > +# python imports > +import urllib2 > + > +# kaa.notifier imports > +from kaa.notifier import Thread, Signals, InProgress
I think we should start trying to use lazy importing more. kaa is actually getting fairly big, and importing a module tends to indirectly import a whole lot of stuff that may never be needed. I did some work in kaa.popcorn toward that, but there are a lot of other places we could tweak. In this case, we really only need to import imlib2 in the constructor of the URL class (and add it to globals if needed). No need to import the module unless we need to use it. But actually I wonder if a more generic solution would be workable. It'd be possible to hook import to do load a module only once it is referenced. I think this approach would work (would need to test it though), although care will still have to be taken that we don't reference modules until they truly are needed. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel