Implemented list batching in cPickle.
This commit is contained in:
parent
b3de48b5bb
commit
1d3b81205e
14
pep-0307.txt
14
pep-0307.txt
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue