Implemented list batching in cPickle.

This commit is contained in:
Tim Peters 2003-02-11 21:23:59 +00:00
parent b3de48b5bb
commit 1d3b81205e
1 changed files with 14 additions and 0 deletions

View File

@ -718,6 +718,20 @@ Protocol identification
immediately. immediately.
Pickling of large lists and dicts
Protocol 1 pickles large lists and dicts "in one piece", which
minimizes pickle size, but requires that unpickling create a temp
object as large as the object being unpickled. Part of the
protocol 2 changes break large lists and dicts into pieces of no
more than 1000 elements each, so that unpickling needn't create
a temp object larger than needed to hold 1000 elements. This
isn't part of protocol 2, however: the opcodes produced are still
part of protocol 1. __reduce__ implementations that return the
optional new listitems or dictitems iterators also benefit from
this unpickling temp-space optimization.
Copyright Copyright
This document has been placed in the public domain. This document has been placed in the public domain.