[Zope-dev] ZOBD and pointers

Yair Benita y.benita at wanadoo.nl
Mon Jun 20 08:26:43 EDT 2005


Hi All,

As my ZODB data files become larger and larger I am looking at ways to make
the structure of my objects more efficient. To simplify my question, suppose
I have two different classes and both contain a list of a objects from a
third class:

class x has the attribute x.elements = [objects of class z]
class y has the attribute y.elements = [objects of class z]

As far as I understand python the lists x.elements and y.elements contain
pointers to the z objects previously defined. What I wanted to know is how
ZODB handles that (or maybe I should say: how pickle handles that) when
saving to a file. Will the pointers be converted to a copy of the z class
objects or will one copy of the z class objects be saved and than the
x.elements and y.elements will still be a list of pointers?

Thanks for the help,
Yair
-- 
Yair Benita
Utrecht University
The Netherlands





More information about the Zope-Dev mailing list