Rafal, what tool have you used for profiling the app?

I was wondering too why I'm getting execution time warning when 95%+
of the time was spent on framework code. I have
a simple query that returns 20 results ordered by date and this gets
flagged everytime even if I don't do anything.

./alex

On Nov 8, 9:36 pm, Rafal Jonca <[EMAIL PROTECTED]> wrote:
> I have a blog app which I think is created properly, but I'm getting a
> strange behavior from time to time for blog RSS posts. App is based on
> Django 1.0 (zip import) + GAE Helper. For most of the time (but not
> only there) I see the strange behavior when someone gets me RSS feed.
> I've started a random profiling of the code and here is what i got:
>
> 11-08 10:40AM 46.407 /blog/rss/kategoria/django/ 200 2465ms
> 19793mcycles 8kb
>
> Profile data:
>          191781 function calls (181229 primitive calls) in 2.404 CPU
> seconds
>
>    Ordered by: internal time
>    List reduced from 687 to 25 due to restriction <25>
>
>    ncalls  tottime  percall  cumtime  percall
> filename:lineno(function)
>       128    1.716    0.013    1.933    0.015
> {google3.apphosting.runtime._apphosting_runtime___python__apiproxy.Wait}
>  4769/128    0.082    0.000    0.192    0.001
> {google3.net.proto._net_proto___parse__python.MergeFromString}
>       372    0.033    0.000    0.230    0.001 /base/python_lib/
> versions/1/google/appengine/api/datastore.py:502(_FromPb)
>  4769/128    0.021    0.000    0.208    0.002 /base/python_lib/
> versions/1/google/net/proto/ProtocolBuffer.py:61(MergeFromString)
>       128    0.021    0.000    0.021    0.000
> {google3.apphosting.runtime._apphosting_runtime___python__apiproxy.MakeCall }
>      1360    0.015    0.000    0.038    0.000 /base/python_lib/
> versions/1/google/appengine/api/datastore_types.py:
> 1299(FromPropertyPb)
>
> There are two things I don't understand:
> 1. Why 128 Wait calls when I have in my pathway only three queries,
> shown below?
>
> tag = Tag.get_by_key_name(bits[0])
> return Entry.all().filter('tags =', tag.name).order('-
> pub_date').fetch(10)
> current_site = cls.all().filter('id =', sid).get()
>
> There is no put() in the path, just getting at max 12 entities.
>
> 2. As you can see most of the time was not spend in my app (all Google
> code), so why I see warnings in logs and dashboard to get the code
> optimized, when I cannot do anything about it?
>
> I've looked into to feed generator code from Django and i do not see
> anything strange here. When i add memchaching to the blog RSS, the
> response time drops to 20ms. By the way generating a standard blog
> page, which has more data: also month list, newest comments list, top
> tags list etc. takes normally about 100-150ms without caching.
>
> Any ideas?
>
> --
> Rafał Jońca
> Blog:http://www.rafaljonca.org/
--~--~---------~--~----~------------~-------~--~----~
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