manatlan
unread,Jul 19, 2008, 7:23:45 AM7/19/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
I've needed to store a dict (1000 key/values) in an entity (value is a
tuple of unicode, float and datetime. key is a string)
My first try was to pickle it and to store it in db.Blob. Really
simple, but pickle is slow, and consumed a lot of CPU cycle
so I decided to avoid pickle, and build my own serializer/
deserializer ....
My second try, was to transform my dict as a list (with a homemade
serializer), and store it in a
db.ListProperty( db.StringProperty ) ... But it was a nightmare in
consuming CPU cycle. All was consumed by google api with the
listproperty of string. First solution was a lot better.
My last try, was to transform my dict as a string (with a homemade
serializer), and to store it in a db.TextProperty ... the better way
(and from far !)
The nightmare was really during the second solution. "ListProperty of
Stringproperty" consume a lot of cpu cycle ... (with 1000 strings) ...
If 1st solution as a ration of 1. Second was 1.5 ... and third/last is
0.5.
And the big nightmare is that I've done my tests in production, on the
default version (sic ;-)... with people on website ... during the
second test : a lot of 403 quotas gives me a lot headaches ;-)....