Ok, may be the problem was in json serialization/deserialization.

But I'm learning the Python/GAE and still eager to get answer to my
question regarding how to store some values accessible throug out
request without passing them through out all my layers.

Any help?
--
Alex
http://sharp-developer.net/

On Dec 1, 7:39 pm, "Joel Odom" <[EMAIL PROTECTED]> wrote:
> Try getting rid of the memcache in favor of a hard-coded value (for testing
> purposes only).  If you're still getting high CPU usage, then the problem is
> not with your use of memcache.
> You can also use global variables to cache values, as long as you're
> careful.
>
> On Mon, Dec 1, 2008 at 2:28 PM, Sharp-Developer.Net <
>
>
>
> [EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have to retrieve some entities by key multiple times during single
> > request.
>
> > I do use memcache but getting quite high CPU usage and lot's of
> > warnings.
>
> > As I retrieve the same entity by it key multiple (many) times during a
> > request I wonder could I improve my code by caching results on per
> > request handler instance basis? I sure I could but as newbie in Python
> > I'm not sure what is the best place & way to do that.
>
> > I could add variable to a request object (I use Django) but that will
> > require to pass it to every place where I need to use it. It's too
> > complicated.
>
> > I wonder is there such a thing like a HttpContext.Current in C#? In
> > ASP.NET if I want to store/retrieve an object on per request basis
> > I'll simply do next:
>
> >   HttpContext.Current.Items["key"] = value;
> >   var value = HttpContext.Current.Items["key"];
>
> > Is the anything similar in AppEngine/Python?
>
> > Again, as a Python newbie will apreciate a working code sample.
>
> > I think this question could be interesting to many people.
>
> --http://giscoder.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
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