[issue15200] Faster os.walk

Serhiy Storchaka report at bugs.python.org
Wed Oct 17 15:20:59 CEST 2012


Serhiy Storchaka added the comment:

Timing of walk depends on how deep we dive into the directories.

$ ./python -m timeit -s "from os import walk"  "for x in walk('/home/serhiy/py/1/2/3/4/5/6/7/8/9/cpython/'): pass"
10 loops, best of 3: 398 msec per loop
$ ./python -m timeit -s "from os import fwalk"  "for x in fwalk('/home/serhiy/py/1/2/3/4/5/6/7/8/9/cpython/'): pass"
10 loops, best of 3: 249 msec per loop

Given the above mentioned objections (consuming a lot of file descriptors, OS/FS dependency, testing burden) I withdraw my patch and close the issue. Thanks all for discussion.

----------
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15200>
_______________________________________


More information about the Python-bugs-list mailing list