[Zope] python script ques

Michal Bencur zope@benko.sk
Wed, 12 Jun 2002 09:35:41 +0200


Hi Oliver,

I don't know how Catalog works, but:

I believe that using objectIds() cause getting all Ids
into array into memory, and when using Catalog, you only
access a BTree and don't iterate over all of it's values,
but only until Catalog finds object with such id/attribute.

because of this using Catalog should require loading less
data, less memory required, so it should be faster I guess.

I know nothing about internals of Catalog, so fix me if I'm
wrong please.


Michal

> it isn't soo slow.
> 
> objectIds() gets it's information straight from a dictionary, so this is 
> quite fast.
> OTOH (and perhaps you thought of that), objectValues() is slow compared 
> to objectIds(), because it wakes up every object in that container.