npinto/mail-trends — pull request #1 by my-flow (2011-11-01 21:16:14+00:00)
Title: BUGFIX: maximum recursion depth exceeded

Modified Andrew M. Kuchling's Python implementation of Jamie Zawinski's
threading algorithm (see http://www.amk.ca/python/code/jwz). The
"maximum recursion depth" error was a function of the number of email
messages since two container methods were recursive, which led to a
growing call stack. Now, both container methods work iteratively: The
"length" of a container is calculated by caching intermediate results;
the descendants of a container are found using depth-first search.