Thanks for the feedback.

I solved the issue by caching the get_serving_url for subsequent requests.

something like this (not exact code):

def image(self, size=0):
 try:
    not_found '/images/not_found.jpg'
    image_url = memcache.get('some_key:' + self.id + ':' + str(size))
    if not image_url:
     if self.image:
      blob_key = self.image.blob_key
      image_url = get_serving_url(blob_key, size)
      memcache.set('some_key:' + self.id + ':' + str(size), image_url)
     else:
      image_url = not_found
 except:
  image_url = not_found
  #logging error
 return image_url






On Wednesday, January 16, 2013 12:34:15 PM UTC-5, Joker321 wrote:
>
> Latency for my application seems to be very high even though I've 
> optimized it significantly.
>
> Here is an appstats sample for one of the requests:
>
> (4) 2013-01-16 08:33:19.750 "GET /" 200 real=3154ms api=0ms overhead=12ms (39 
> RPCs, cost=0, billed_ops=[])
> images.GetUrlBase   18  0   
> memcache.Get            10  0   
> datastore_v3.Get    9   0   
> datastore_v3.RunQuery   1   0   
> user.CreateLogoutURL    1   0
>
> Seems images.GetUrlBase is one of the main culprit as well as memcache 
> (?). Currently I have blob being fetched and passed to get_serving_url, 
> with variable image sizes throughout the application.
>
> Any recommendation on performance improvements? thanks
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/QeySeVXeYUwJ.
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