So given that I need modules a,b and c for all of my request handlers,
I'm better off having fewer
larger modules rather than a script for each page?

A

On Oct 21, 4:59 pm, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
> Hi Adam,
>
> The biggest thing you can do to in this case is don't import large modules
> until you need them.  If your app has been idle for awhile, it will take
> some CPU to warm up the Python interpreter in terms of import costs, but not
> loading big modules until/unless they are needed, you will only incur this
> cost when necessary.
>
> It should also be noted that sometimes it's expected that a request might
> take more CPU than average.  The key is to limit those requests overall.
>
> If you are interested in optimizing your app, I would suggest watching
> 'Building Scalable Web Applications', one of our Google I/O 
> talks:http://sites.google.com/site/io/building-scalable-web-applications-wi...
>
> -Marzia
>
> On Tue, Oct 21, 2008 at 1:54 PM, Adam <[EMAIL PROTECTED]> wrote:
>
> > I'm getting high cpu warnings when I hit the main page of my app
> > (www.fyood.com) for the first time after being idle for 10-20
> > minutes.
>
> > Given that the warning isn't there the second time (250 v.s. 2500 mega
> > cycles), and there's no datastore activity, it seems like this is the
> > cost of creating the objects, loading imports etc.
>
> > Anyone have a good strategy for dealing with this, or a good handle on
> > which pieces are more expensive.
>
> > e.g. should I create smaller classes, fewer classes, less but larger
> > modules, more smaller modules etc. do less regex compiles etc.
>
> > Also, any pointers to specifics on the high cpu quota?  e.g. 3 times/
> > hour, 3 times/minute etc.
>
> > A
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to