So you want to store a "very long list of numbers" in your AppEngine Model
which doesn't need to be indexed.

Well, you could just do this:

*class Foo(db.Model):
 numbers = db.ListProperty(int, indexed=False)
*
However, you will quickly notice that the performance and the memory
consumption of this sucks if you add thousands of integers to this list.

Instead you should use the native python "array.array" type as the list and
store it in a BlobProperty. It's up to 30x faster!

I created a library that does exactly this (free, apache 2.0 license):
http://devblog.miumeet.com/2011/08/much-more-efficient-implementation-of.html

Once you have the library, all you need to do is this to get a huge
performance boost:

*class Foo(db.Model):
 numbers = db.ArrayProperty()*

The blogpost also has more details and an appstat comparison.

Cheers & hope you like it
-Andrin

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to