On Nov 6, 2007, at 3:01 PM, Roché Compaan wrote:
On Tue, 2007-11-06 at 17:40 -0200, Sidnei da Silva wrote:
Despite this change there are still a huge amount
of unexplained calls to the 'persistent_id' method of the
ObjectWriter
in serialize.py.
Why 'unexplained'? 'persistent_id' is called from the Pickler
instance
being used in ObjectWriter._dump(). It is called for each and every
single object reachable from the main object, due to the way Pickler
works (I believe). Maybe persistent_id can be analysed and optimized
for the most common cases?
If you look at the profiler stats I posted earlier you would have
noticed that there was about 1.3 million calls to persistent_id while
only 20000 objects were persisted. So if it is being called for each
object I would expect a figure closer to 20000, not 1.3 million.
What am
I missing?
It's called for *all* objects, not just persistent objects. This
includes, ints, strings (including attribute names), etc.
Jim
--
Jim Fulton
Zope Corporation
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev