kinda, if the type is 'u' the whole array is interpreted as one
unicode string. But it doesnt make much sense, because its
just a wrapper around a blob, so you could just use a blob property
to store your strings and use a special delimiter to split them...

-Andrin

On Wed, Aug 3, 2011 at 8:09 PM, andreas schmid <a.schmi...@gmail.com> wrote:

> is there a way to use this ArrayProperty to store a list of strings?
>
> On Aug 3, 2011, at 10:15 AM, MiuMeet Support wrote:
>
> You can fit up to 131'072 elements in there, afterwards you hit the 1mb
> entity limit (entity overhead aside, but 100'000 are def possible).
>
> Put and Get performance are really fantastic, 10ms each, see the blog post.
>
> -Andrin
>
> On Wed, Aug 3, 2011 at 9:23 AM, andreas schmid <a.schmi...@gmail.com>wrote:
>
>> does this also mean that there is no 5000 objects limit on the list?
>> is the get performance good as the put?
>>
>> thx for sharing this.
>>
>> On Aug 2, 2011, at 9:04 PM, Ikai Lan (Google) wrote:
>>
>> Thanks Andrin!
>>
>> If anyone is wondering why this is, it's because the List property is
>> serialized and deserialized using protocol buffers. Protocol buffers are
>> very useful for things like validation and cross language compatibility, but
>> you can sometimes gain some performance benefits by serializing and
>> deserializing using native methods. The protocol buffer implementation for
>> Python is noticeably slow, even via the native extension (if you can improve
>> this - Google wants to hire you), so I'm not surprised techniques like this
>> work.
>>
>> --
>> Ikai Lan
>> Developer Programs Engineer, Google App Engine
>> plus.ikailan.com | twitter.com/ikai
>>
>>
>>
>> On Tue, Aug 2, 2011 at 9:18 AM, Andrin von Rechenberg <andri...@gmail.com
>> > wrote:
>>
>>> 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.
>>>
>>
>>
>> --
>> 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.
>>
>>
>>
>> --
>> 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.
>>
>
>
> --
> 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.
>
>
>  --
> 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.
>

-- 
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