[issue13229] Improve tools for iterating over filesystem directories

Nick Coghlan report at bugs.python.org
Tue Jan 8 02:55:56 CET 2013


Nick Coghlan added the comment:

The problem with the current walkdir implementation is that without a rich path object you end up making a lot of redundant system calls. Combined with the inherent overhead of nested generators, it just *feels* bad (even in situations where worrying about the speed is truly a case of premature optimisation)

The caching in pathlib should deal with the problem of redundant system calls, so rebasing walkdir on top of that would probably be a good idea (i.e. all walkdir APIs would produce pathlib paths, and implicit convert strings they encounter to paths).

----------

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


More information about the Python-bugs-list mailing list