pickle complexity limit?
Mark Hahn
mark at hahnca.com
Sun Nov 9 18:15:12 EST 2003
I have a heavily interlinked dom like tree structure of objects. A node
will link to many children redundantly and many children will reference
parents redundantly. So there are many cycles of references.
When I tried to cPickle one of these structures with about 700 nodes the
python interpreter crashed. I did a binary search limiting the number of
nodes added and it could handle 217 nodes. I switched to pickle and now it
gives a recursion limit exception instead of crashing.
I don't understand how this could happen with pickle. Isn't it supposed to
stop when it runs into an object it has already pickled? Couldn't it have
been coded in a stackless way?
What do I do now? I don't want to recompile with a deeper stack as this
will obviously only help in limited cases, not solve the real problem.
More information about the Python-list
mailing list