Windows' mysterious built-in quick directory find

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I have some code that recursively searches through a root directory on
another machine for a single directory with a particular name. It works as
expected but given the large size of the structure it takes on average about
7 seconds. If I use Explorer instead, the whole search takes 12 seconds, but
the result I'm looking for always pops up almost instantly.

I'd really like to be able to return the first search hit in less than a
second in my own app. Is it even possible to hook into whatever trick
Windows is using to be that fast?

Paul
 
Found the trick... recursive is bad for searching at least in this
particular case. Changed to per-level iterative and now it's very fast, on
the order of milliseconds. I'd be willing to bet Windows does the same
thing.

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top