[Zope3-dev] Re: performance and BTrees

Christian Heimes heimes@faho.rwth-aachen.de
Thu, 01 May 2003 15:42:22 +0200


Steve Alexander wrote:
> You should either cache the results of calculating messageList, or 
> (better), maintain your own index of the date that messages are posted.

My idea was to maintain an index as a btree with the thread data using 
the event service. As far as I know a list is sorted very quickly when 
some unsorted data is append or data is removed. Perhaps you (Marcus) 
can subclass a btree to make it a self sorting btree.

Is it a good idea to have thousands of objects (here threads) which 
implements ISubscriber from the event service or would it be better to 
code an adapter which do the caching work and is queried for the data? I 
suppose the adapter would be better.


Christian