[Zope-dev] ZCatalog space consumption question

Michel Pelletier michel@digicool.com
Fri, 28 Apr 2000 13:11:14 -0700


Kevin Dangoor wrote:
> 
>     If I have a ZCatalog with a whole bunch of indexes and metadata fields
> that tracking many different types of objects, will there be space wasted
> for the fields that *don't* appear in a given object? For example, if "foo"
> is in the metadata table, but my "Bar" ZClass doesn't have a "foo" property,
> will some amount of space be wasted in the catalog for "foo" or will "foo"
> just be ignored?

Some amount of space will be wasted in the metadata table (the
sizeof(None)).  There is a memory/speed tradeof between keeping
information in the metadata table and just fetching it from the object
itself when it is returned on a search result.  It's a good idea to keep
the metadata table fairly trim.
Object's without attributes do not waste any space in indexes.

-Michel