How often are your requests coming in? If your requests are coming in
at a low rate, it's possible that your instances are being spun down
then spun back up which could account for such a delay -- if requests
are coming in steadily, e.g. every few seconds, your instances
shouldn't be spun down.

imported modules are already cached, but have you looked into app
caching yet? If you add a main() routine, your handler scripts will be
cached between requests, which could help response time:

http://code.google.com/appengine/docs/python/runtime.html#App_Caching

- Jason

On Apr 5, 7:22 am, Coonay <fla...@gmail.com> wrote:
> No,i profiled the db insert operation  and found the it's not the db
> insert that 's time consuming,it's the Loading __main__ itself
> consuming a lot of time,could you tell me why
> Loading __main__ spend so much time?
>
> 04-05 07:13AM 57.908 /gwt/Home/post_nost 500 888ms 1677ms-cpu 0kb
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19
> (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19,gzip(gfe)
>
> 222.65.30.191 - [05/Apr/2009:07:13:58 -0700] "POST /gwt/Home/post_nost
> HTTP/1.1" 500 180 "http://coonay.appspot.com/
> 1DD6B98BD09B2027717DAF593993F70D.cache.html" "Mozilla/5.0 (Windows; U;
> Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/
> 1.0.154.53 Safari/525.19,gzip(gfe)"
>
> 04-05 07:13AM 57.944
> Loading __main__
>
> 04-05 07:13AM 58.629
> Trace into post_nost
>
> 04-05 07:13AM 58.715
> update ok
> 04-05 07:13AM 58.722
> Trace out post_nost
>
> On Apr 5, 9:43 pm, Coonay <fla...@gmail.com> wrote:
>
> > Maybe it's the write operation that slow down the Loading __main__ ,in
> > the request ,a new record is insert into the app engine store,i
> > suspect thats the main reason of my problem,
> > what method do u use to profile the write  operation and optimize the
> > write operation?
>
> > On Apr 5, 9:27 pm, Coonay <fla...@gmail.com> wrote:
>
> > > The following log  is extracted from the Administration Console, the
> > > Loading __main__ spend nearly 1 second,i use
> > > app engine + django,what factors   do u think make Loading __main__
> > > very time-consume?
>
> > > 04-05 04:00AM 14.739 /gwt/Home/post_nost 500 909ms 1873ms-cpu 8kb
> > > Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19
> > > (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19,gzip(gfe)
>
> > > 222.65.30.191 - [05/Apr/2009:04:00:15 -0700] "POST /gwt/Home/post_nost
> > > HTTP/1.1" 500 8074 "http://coonay.appspot.com/
> > > 1DD6B98BD09B2027717DAF593993F70D.cache.html" "Mozilla/5.0 (Windows; U;
> > > Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/
> > > 1.0.154.53 Safari/525.19,gzip(gfe)"
> > > D 04-05 04:00AM 14.766
> > > Loading __main__
> > > I 04-05 04:00AM 15.517
> > > update ok
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to