Re: Pickling (in 1.2 beta)

Guido.van.Rossum@cwi.nl
Thu, 06 Apr 1995 07:56:37 +0200

> Does anyone have experience with pickling things? I am pickling a
> couple of fairly complex data structures (a user-defined heap class
> where the elements also in a user-defined class, and a dictionary
> where the key is a couple of 10-tuples). I have noticed some very
> heavy slowing down as the sizes of the structures increase, so that
> it is taking a few minutes to pickle things with a few hundred of
> these complicated elements.

Well, it's all implemented in Python at the moment, so some slow-down
is to be expected. What is the size of the resulting file? You could
have a look at the implementation (which is actually quite small) to
see if you can find some obvious bottleneck. You could also profile
it using the (now documented!) profiler.

--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>