Small touches on framing
This commit is contained in:
parent
b26857967d
commit
643a33de69
11
pep-3154.txt
11
pep-3154.txt
|
@ -71,11 +71,14 @@ of a pickle is thus the following::
|
||||||
|
|
||||||
To keep the implementation simple, it is forbidden for a pickle opcode
|
To keep the implementation simple, it is forbidden for a pickle opcode
|
||||||
to overlap frame boundaries. The pickler takes care not to produce such
|
to overlap frame boundaries. The pickler takes care not to produce such
|
||||||
pickles, and the unpickler refuses them.
|
pickles, and the unpickler refuses them. Also, there is no "last frame"
|
||||||
|
marker. The last frame is simply the one which ends with a STOP opcode.
|
||||||
|
|
||||||
How the pickler decides frame sizes is an implementation detail.
|
.. note::
|
||||||
A simple heuristic committing the current frame as soon as it reaches
|
|
||||||
64 KiB seems sufficient.
|
How the pickler partitions the pickle stream into frames is an
|
||||||
|
implementation detail. "Closing" a frame as soon as it reaches
|
||||||
|
~64 KiB should be ok for both performance and pickle size overhead.
|
||||||
|
|
||||||
Binary encoding for all opcodes
|
Binary encoding for all opcodes
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
Loading…
Reference in New Issue