I've put together a small script to collect the import tree and time (I
hadn't had time to clean it yet). You can get it there:
http://bazaar.launchpad.net/~pylons-gae/pylons-gae/trunk/annotate/head%3A/importtimer.py
 </>
It's just a decorator around the built-in __import__. I found this pretty
useful to find and cut down non desired dependency of existing web
framework.

You can get an example of the csv output there (may not work since I'm
messing around with this app):
http://pylons-gae.appspot.com/hellomako/1/import.csv
or
http://pylons-gae.appspot.com/hellomako/1/import.txt

2009/11/10 Stephen <[email protected]>

>
>
>
> On Nov 10, 1:16 am, GAEfan <[email protected]> wrote:
> > Has anyone been able to get App Engine Patch working without importing
> > Django.zip every time?  We are getting far too many
> > DeadlineExceededErrors.
> >
> > Unfortunately, AEP has essentially created a custom version of Django,
> > so it's not really a 'patch' but a different version.  Would be nice
> > to make it a real patch, where it adds to the current Django, instead
> > of rebuilding it.
> >
> > We need to find a way to stop importing AEP's Django every time.  Any
> > ideas?
> >
> > We use user authentication, (standard username, password, not Google
> > ID)
>
>
> You could try splitting the single, large zipfile into multiple,
> smaller zipfiles. Zip all the contrib modules individually, for
> example.  It may be a win to leave some parts of django unzipped (the
> parts which are used on every request, say), but leave less-used parts
> zipped. The __path__ variable and similar can be used to stitch the
> pieces back together:
>
>
> http://docs.python.org/tutorial/modules.html#packages-in-multiple-directories
>
> It may also be worth experimenting with the compression ratio of the
> zipfile. If i/o is the bottleneck, a higher compression setting may
> produce quicker imports. If cpu is the bottleneck, lower compression
> may be faster. It is possible to use zero compression in a zipfile, if
> needed, in which case it is like tar.
>
> You could also alter the order of the source files within the zipfile.
> Experimentally, trace the import order for a popular sample URL, from
> a cold start. Add those files, in import order, to the zipfile first,
> then append the rest. Hopefully at runtime they will stream out of the
> zip in the order in which they are used and this will be more
> efficient.
>

--

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=.


Reply via email to