Following up on my idea of using pickle protocol 2. I implemented this
in a fully configurable fashion on a branch, mainly to ease
benchmarking and testing of the different variants.

My conclusions (maybe for future reference):

- There's no significant win of just switching the pickle protocol
- The code to make the protocol configurable on all levels (storage,
index, persistent cache, ...) is large and ugly, if there's an
improvement in the new protocol, I'd change the default without a
config option
- There's no significant reduction in size for typical content
management like data
- Protocol 2 is only more efficient at dealing with boolean values,
small tuples and longs - all infrequent in my type of data

Potential follow-up experiments:

- Use protocol 2 in combination with the extension registry, use codes
in the "128 to 191 - Reserved for Zope" range for ZODB internal types
(BTrees, PersistentMapping and PersistentList) [1]


[1] http://www.python.org/dev/peps/pep-0307/
For more information about ZODB, see the ZODB Wiki:

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

Reply via email to