This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fdrake
Recipients alexandre.vassalotti, belopolsky, fdrake, mark.dickinson, pitrou, rhettinger
Date 2010-06-30.00:54:07
SpamBayes Score 3.8550198e-08
Marked as misclassified No
Message-id <1277859250.28.0.807479978024.issue9120@psf.upfronthosting.co.za>
In-reply-to
Content
> Fred was a proponent of small pickle sizes in the past,
> so I am adding him to the nosy list.

Thanks!

I am a proponent of small pickle sizes, in cases where it
matters.  I'm not convinced this is such a case.

The case for a small pickle size for datetime objects is
that they're very common in pickle-based persistent object
stores, such as ZODB.

Set objects are much less common in this environment; this
extends to most of Python's mutable data structures.  There
are three cases worth noting:

1. A separate persistent object is used to provide an API
   around the core Python data type, with an identical or
   similar API.  This is done to take care of noting
   changes, so the need to update the stored object is
   tracked.  In these cases, minor changes in the pickled
   size of the core object are swamped by the reference to
   the wrapper class.

2. An immutable object is used instead, and updates simply
   replace the value.  This allows the referring object to
   be responsible for change tracking, but means that types
   like the set, list, and dictionary aren't frequently
   used (though they may be used by other objects are part
   of their pickled representations).

3. Application objects may use mutable objects as part of
   their stored data value, but keep careful track of
   updates themselves.  This is most often the case when
   we want to avoid multiple round-trips to the storage
   server, and the size of the pickle isn't particularly
   interesting.

This isn't an argument that the change shouldn't be made,
but experiences with ZODB-like storages don't necessarily
suggest that all pickle sizes need be minimized.
History
Date User Action Args
2010-06-30 00:54:10fdrakesetrecipients: + fdrake, rhettinger, mark.dickinson, belopolsky, pitrou, alexandre.vassalotti
2010-06-30 00:54:10fdrakesetmessageid: <1277859250.28.0.807479978024.issue9120@psf.upfronthosting.co.za>
2010-06-30 00:54:08fdrakelinkissue9120 messages
2010-06-30 00:54:07fdrakecreate