joerussbowman / gaeutilities

gaeutilities - A collection of utilities to help with application development on Google Appengine
http://gaeutilities.appspot.com
BSD 3-Clause "New" or "Revised" License
78 stars 4 forks source link

Session could be improved for more performance #2

Open joerussbowman opened 15 years ago

joerussbowman commented 15 years ago

There's a lot of serialization that happens with session. Except for Models, anything going in as a session data item is pickled on write. So reads are unpickled, which in appengine can be a little heavy.

A few ideas are

Note: I'm not accepting this at this time, though this is fair game for anyone to take on AFTER the 1.3 release.

joerussbowman commented 14 years ago

I've thought about this a little, and think maybe there's an alternative to the WSGI approach. That's to make session a decorator. That would allow you to insert the session object to any function, and handle saving it at the end. Also seems to be the most pythonic approach.

Still have no idea when I'll get to this unfortunately. I might make a side project out of it. This however would be a pretty big change and will impact exist code. This would be a version 2 release for gaeutilities most likely.

joerussbowman commented 14 years ago

Guido would agree I think - http://groups.google.com/group/google-appengine-python/browse_thread/thread/f2794adaac5723d9/3ba1f13156642f39?lnk=gst&q=middleware#3ba1f13156642f39

lol