[Grok-dev] Re: Performance of OrderedContainer

Sebastian Ware sebastian at urbantalk.se
Tue Jun 17 10:07:09 EDT 2008


17 jun 2008 kl. 14.25 skrev Godefroid Chapelle:

> Sebastian Ware wrote:
>> I was looking at the trunk of grok because I need to use  
>> OrderedContainer. But, if I add say 1 million objects to an  
>> OrderedContainer, won't it become very slow due to the  
>> implementation with PersistentList? Say that I want to show the  
>> last 100 of the objects, I would have to return all 1 million keys.
>> Mvh Sebastian
>
> Seems strange to store 1 million objects in an ordered container.
> The use case for Ordered Container is for user-sorted content.
> I am skeptical about a user sorting 1 million objects.
>
> IOW, I would not care of performance when I use OrderedContainer  
> because it would hold human manageable number of objects.
>
> OTOH, if I would need to present 1 million objects, I'd sort them  
> only at presentation time based on correct filters.
>

Maybe, but if one can make it work, maybe that would be a good thing.

mvh Sebastian


More information about the Grok-dev mailing list