SpanMode uses incorrect terminology (breadth)
Mehrdad
wfunction at hotmail.com
Mon Oct 8 03:36:43 PDT 2012
On Tuesday, 18 September 2012 at 15:19:08 UTC, Andrei
Alexandrescu wrote:
> On 9/18/12 10:25 AM, David Piepgrass wrote:
>> Actually I prefer breadth-first search when searching the file
>> system. When I search an entire volume, inevitably the
>> (depth-first) search gets stuck in a few giant, deep
>> directories like the source code of Mono or some other cave of
>> source code, you know, something 12 directories deep with
>> 100,000 files in it. A breadth-first search would be more
>> likely to find the thing I'm looking for BEFORE going
>> spelunking in these 12-deep caves.
>
> Yes, that was my intent too.
>
> Andrei
I just wanted to point out, BFS is generally a pretty BAD idea
for searching a file system.
You instead probably want to implement DFS, and then alter it
slightly to use iterative deepening instead of doing plain
breadth-first search.
That way you won't be keeping open a million OS file handles.
More information about the Digitalmars-d
mailing list