This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients hynek, jcea, ncoghlan, neologix, pitrou, rosslagerwall, tarek
Date 2012-01-31.21:42:02
SpamBayes Score 1.0137454e-08
Marked as misclassified No
Message-id <CAH_1eM3xYiGgA4q70Y=-15W=HRNsbgqZ5uzt4SA1rq6EshyPbw@mail.gmail.com>
In-reply-to <1328018694.87.0.217712973532.issue13734@psf.upfronthosting.co.za>
Content
Here are two new versions, both addressing Antoine's and Nick's comments:
- fwalk-3.diff is just an updated version
- fwalk-single_fd.diff doesn't use more than 2 FDs to walk a directory
tree, instead of the depth of directory tree. It's not as simple and
clean as I'd like it to be, but it should be much more robust, and
still safe (please make sure about that :-).
I was a little worried about the performance impact, so I did some
trivial benchmarks:
- O(depth) fwalk() is actually a tiny bit faster than walk() (it may
be because we don't do as much path lookup)
- O(1) fwalk() is around 20% slower, on a pure-traversal benchmark (so
in a realistic use case where we would actually do something with the
values returned by fwalk() the difference shouldn't be that
noticeable)
Files
File name Uploaded
fwalk-3.diff neologix, 2012-01-31.21:42:00
fwalk-single_fd.diff neologix, 2012-01-31.21:42:02
History
Date User Action Args
2012-01-31 21:42:04neologixsetrecipients: + neologix, jcea, ncoghlan, pitrou, tarek, rosslagerwall, hynek
2012-01-31 21:42:02neologixlinkissue13734 messages
2012-01-31 21:42:02neologixcreate