[Twisted-Python] Unjelly - recursion limit reached
David K. Hess
dhess at verscend.com
Fri Nov 11 09:26:03 EST 2005
On Nov 7, 2005, at 8:42 AM, David K. Hess wrote:
> Bottom line, if all of these things are true, then I'm not sure
> what is going wrong. Is it possible that jelly is at times walking
> my object graph (which is interconnected to a certain degree and
> changes dynamically) in such a way that it has to perform a
> significant amount of recursion? In other words, maybe this isn't a
> bug but I just need to increase the runtime recursion limit?
>
> FYI, here's a snippet of the exception:
I hate replying to my own post but I'm beginning to believe that
recursion is the root of the problem and want to focus on it. From
the exception trace, it looks like it takes on average 3.5 stack
frames to unjelly a nested object. With a default recursion limit of
1000 stack frames, this means that Twisted is limited to transferring
an object graph that has a depth first traversal through it of length
285 objects (roughly speaking). You could of course easily create a
linked list of 285 objects to force the situation.
This is a pretty scary limitation. Is anybody working on a non-
recursion based version of jelly? Am I going to have to move to
Stackless Python?
Thanks.
Dave
More information about the Twisted-Python
mailing list