[ZODB-Dev] Pickle protocol version 2

Hanno Schlichting plone at hannosch.info
Sat Dec 22 20:27:42 EST 2007


Hi,

for those of you watching the commit lists closely I made a branch at:

svn://svn.zope.org/repos/main/ZODB/branches/hannosch-pickle-protocol-version2

which uses a very simple approach to using the pickle protocol version 2
in all parts of the ZODB by externalizing it into a constant in
config.py and changing all protocol versions from a hardcoded 1 into
using the constant.

My main motivation was to see how much work this would be and see the
actual size reduction / speed improvement this could bring.

After doing benchmarks with some real world Data.fs from various Plone
sites I had (small ones up to some gigabyte of data) and some
handcrafted ones, there doesn't seem to be any performance difference
and an average 1% size reduction. Obviously this is highly dependent on
the data as version 2 only gives advantages in the way the object
metadata is stored but not the payload of the object, data.fs files with
a high number of small new-style class based objects might see some
bigger improvements.

Now without using the highly debatable 'extension registry' mentioned in
http://www.python.org/dev/peps/pep-0307 this doesn't seem to be much a
gain, though.

If others want to play with the branch feel free to do so. Unless
someone can convince me of the real value in pursuing this I'll abandon
the branch.

Hanno

P.S. For the last thread on this issue see
http://mail.zope.org/pipermail/zodb-dev/2006-June/010250.html



More information about the ZODB-Dev mailing list