On Feb 4, 2008, at 1:54 PM, Roché Compaan wrote:

I don't follow? There are 20000 insertions and there are 1338046 calls
to persistent_id. Doesn't this suggest that there are 66 objects
persisted per insertion? This seems way to high?

It seems like there is some confusion about the correspondence between
"persisting an object" and calls to persistent_id().  The pickler makes
lots of calls to persistent_id() as it is making pickles.
In my mind, "persisting an object" means saving the new state of
an instance of Persistent.  When you insert a new persistent instance
in a BTree, you are "persisting" the new instance, the bucket/node
that holds the reference to the new instance, and in some cases,
some small number of other bucket/nodes that are changed as part of
the insertion.  That's it.  If you insert a bunch of things in one
commit(), the number of persistent instances committed is even smaller because
some buckets will get multiple changes in one write.

There are usually many calls to persistent_id() when one btree bucket is
pickled, but I would count that as 1 persistent object.

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to