[issue3873] Unpickling is really slow

Alexandre Vassalotti report at bugs.python.org
Tue Oct 7 23:12:44 CEST 2008


Alexandre Vassalotti <alexandre at peadrop.com> added the comment:

The solution is to add a read buffer to Unpickler (Pickler already has a
write buffer, so that why it is unaffected). I believe this would
mitigate much of the (quite large) Python function call overhead.

cPickle has a performance hack to make it uses cStringIO and PyFile 
directly (via C function calls). In Python 3, the hack was removed since
cStringIO.h and fileobject.h aren't public anymore. This explains the
0.02s deviation you are getting for dump speed.

----------
nosy: +alexandre.vassalotti

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3873>
_______________________________________


More information about the Python-bugs-list mailing list