Using get(key) is faster then a Model.gql().fetch() or Model.all().fetch(). db.get(key_list) is faster. But still you have to go to the datastore and that takes time. But getting data from memcache is very fast.
Why don't you cache the result from the template rendering? > The only extra Python code is to keep track of objects in a dictionary > to make sure I have only one copy of every object. Do you have to merge the results from a couple of queries? I don't know how efficient Django as a framework is. I only use the template rendering. And that is not very expensive. 2009/1/22 Roman <[email protected]>: > > There is not much going on in the Python code. Based on URL I retrieve > a few objects and setup a context for a template. I memcache either > objects > or keys (assuming that get(key) is as fast as getting an object from > memcache). > The only extra Python code is to keep track of objects in a dictionary > to make > sure I have only one copy of every object. > > I am using django dispatch loop and noticed that a redirect request > alone > (too add a /) may take 500 ms. A request that results in all objects > or keys > coming from memcache (say 10) still can take sometimes 1600ms, which > gives me a red warning (I think 1500 is the threshold). > > I wonder how accurate is the time sampling. > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
