On Oct 4, 2008, at 7:35 PM, Hanno Schlichting wrote:

> Laurence Rowe wrote:
>> Leonardo Santagada wrote:
>>> Why doesn't zodb has a table of some form for this info? I heard  
>>> that
>>> sometimes for very small objects the string containing this
>>> information can use up to 30% of the whole space of the file (using
>>> FileStorage). How does RelStorage store this?
>> I believe this was what the python pickle protocol 2 was created for.
>> However I think when someone last looked the potential space savings
>> with real world data did not justify making the change (Hanno has a
>> branch in svn for this).
> I tried out the protocol 2 format on its own. That only brings in
> advantages for new-style classes. My very informal tests didn't reveal
> any significant improvements.
> My use-case is storing document centric data in the ZODB, in which  
> case
> the actual payload will always be a lot larger compared to the header
> information.
> You can have a look at http://www.python.org/dev/peps/pep-0307.
> What you are refering to is the so called "extension registry". To  
> this
> point I haven't heard of any usage of the extension registry  
> mechanism,
> even though it was specifically created for Zope and Zope as a  
> framework
> has the largest block of reserved numbers in the registry :)
> I'd suggest you try this out on some small typical data set and just
> look at the generated pickles.

In zope catalogs the objects are actually very small, maybe it was  
designed for that... but if even they don't use it, it is probably not  
that important.

Thanks for the clarifications though.

Leonardo Santagada
santagada at gmail.com

For more information about ZODB, see the ZODB Wiki:

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

Reply via email to