how to optimize zipimport

John Machin sjmachin at lexicon.net
Sat Apr 4 08:45:11 EDT 2009


On Apr 4, 7:06 pm, "Coonay.appspot" <fla... at gmail.com> wrote:
> On Apr 2, 6:26 pm, John Machin <sjmac... at lexicon.net> wrote:
[snip]
> > > i found the the module in the zip reloaded  everytime the code is
> > > called,i mean, say ,first time it take me 1 second to call a method in
> > > the zip,but it take another 1 second to call the mothod for another
> > > time ,and so on
>
> > How do you know that it is being reloaded each time a methos is
> > called?

You haven't answered the above question.




> > > > Note: it may help when you reply to show a stripped-down version of
> > > > your calling module, sufficient to back up your description of what is
> > > > happening.
>
> > We can only guess if you don't show us what is actually happening.
> > Vague descriptions are not very useful. Show us how exactly you are
> > importing the modules, how you are calling methods, with timing
> > calls ...

No answer.

[snip]

> > Apart from code executed once at app start to inject the path to the
> > zip file into sys.path, have you made any other changes to accommodate
> > using import from zip? If so, what changes?

No answer.

> > Have you tried running your app from the shell (Windows translation:
> > in a Command Prompt window) like this:
>
> > python -v app_start.py
>
> > This will show you all the imports as they happen.

No answer.

> > HTH ... but a clear description from you (plus code samples) of
> > exactly what you are doing woul dhelp a whole lot more.

No answer.

Conclusion: you don't actually want any help.



More information about the Python-list mailing list