[Zope] Nested hashes, ZopeDB bloat, and URL

Toby Dickenson tdickenson@geminidataloggers.com
Fri, 1 Nov 2002 15:51:17 +0000


On Friday 01 November 2002 3:10 pm, chrisf wrote:
> Consider this,
>
> I have a single Family python product.
> Family objects contains a hash of subfamily objects.
> Subfamily objects contain a hash of proteins.
> Protein  objects contain a hash of amino_acids.
> Amino_acid objects contain a hash of atoms.
>
> Since we are talking about a couple thousand proteins and a over a
> million atoms, I don't want to make anything under Family a proper zope
> object.
> I have seen ZopeDB bloat and its is not pretty.

You need to get the granularity right. Too big is just as bad as too smal=
l.

ZODB performs alot of operations at the level of individual persistent=20
objects. If each object is too big, then these operations become ineffici=
ent.

One of the nice things about ZODB is that it is easy to make an object=20
persistent by just adding the 'Persistent' base class. I suggest you=20
experiment.

> Yet because they are not proper objects, they can not be refered to on
> the URL or otherwise.

There is no such restriction. URL traversal occurs independantly of the=20
persistence characteristics of the objects being traversed. I think you h=
ave=20
some other bug.