> For some definition of "a lot of thought". :-) The pickle for pytz.utc
> is now relatively small (though still adds a non-trivial percentage
> addition--30%ish?--to a naive datetime IIRC). That's as far as that bit
A naïve datetime has an extraordinarily small state, though, so 30% isn't
much in absolute terms. IIRC, we're talking dozen of bytes versus hundreds
of bytes for a Zope2 DateTime.DateTime.
Note that we have yet to use a new strategy for shrinking pickle sizes: a
few years ago Python's pickle code grew support for "extension codes", a
registry of class/type names that _can_ be referenced by short (as short as
2 bytes) new pickle codes, instead of embedding the module and class name
into every pickle, over and over again. I don't recall the exact numbers
numbers, but some years ago Jeremy analyzed a customer Data.fs, and
discovered that at least half of it consisted of repetitions of the string
"BTrees.OOBTree.OOBTree" ;-) That's the kind of thing the "extension code"
pickle mechanism was intended to address; it's a simple and cheap
compression gimmick, but so far unused.
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org