[Grok-dev] Re: Performance of OrderedContainer

Godefroid Chapelle gotcha at bubblenet.be
Tue Jun 17 08:25:25 EDT 2008


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.

HTH

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be


More information about the Grok-dev mailing list