ding, ding, ding, we have a winner. One of the guys on the team did just this, he re-implemented the os.walk() logic and embedded the logic to the S_IFDIR, S_IFMT and S_IFREG directly into the transversal code.
This is all going to run on unix or linux machines in production so this is not a big deal. All in all we went from 64+k function calls for 7070 files/dirs to 1 PER dir/file. the new code is just a little bit more than twice as fast. Huge improvement! -- http://mail.python.org/mailman/listinfo/python-list