Here's one neat article from Nick Johnson's blog: http://blog.notdot.net/2010/02/Webapps-on-App-Engine-part-6-Lazy-loading
<http://blog.notdot.net/2010/02/Webapps-on-App-Engine-part-6-Lazy-loading>It shows a method for only loading code for a handler when it is called. You can also see here for a python approved discussion of import costs.. at the end of the section, there is a mention of lazy importing of modules: http://wiki.python.org/moin/PythonSpeed/PerformanceTips#ImportStatementOverhead On Wed, Dec 1, 2010 at 9:00 PM, NealWalters <[email protected]>wrote: > Tim, > How would I go about your one suggestion: "Some other strategies you > can adopt to shrink startup times is trying > to defer some of your imports until you need to use the stuff. " > > I have what I would consider a very large code base, just not many > users at this time. My main.py has probably 200 imports in it. > But if I remove the imports, it won't compile... the WSGI statement > cannot map the URL page name to the appropriate code. > > Neal > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
