Understanding the inner workings of the FIND TOOL


Understanding the inner workings of the FIND TOOL to control and speed up the search inquiry

Searching for files is essential and the functionality of every search when speed is concerned depends on the media the search
is performed on and other obscure factors that we are going to discuss in this post with the help of our favorite developers.

If i'm trying to find something inside an 4TB HDD which is packed with directories with long names and a vast number of small
files then this search can become tedious and of course I do not want to strain my new HDD very much. So it becomes essential
for the user to learn some basic knowledge about how the FIND TOOL searches inside the HDD volumes.

For example when i do a search in the afore mentioned HDD for the string "more speed" the search fuction needs about 60s to
complete the search.

If after a few seconds i repeat the same search, the search fuction needs about 6s to complete the search.

Actually, if after the initial "full search" of the volume there is another search inquiry it will most probably need 6-7s to
complete, so it appears to be a "fast search", unless it is one that yields a rather large number of results.

This happens when there are consequtive searches in a short time frame and there are no volume changes (ie file renaming,
moving a file inside a different folder or creating a new one...) between the search inquiries

I experimented doing a search and then creating a folder and a file named exactly the same as the search string and then
searched again...the result was a "fast search" but now the results included the folder and file. So it seems minor volume changes do not have a slowing effect.

However if after an initial "full search" of the volume there is the exact same search inquiry but now you wait 10-15min
between the searches, the search is not going to be a "fast search" but it is going to last as long as the initial "full
search".

So now after making some points with my observations, here's the million dollar question...please try to explain the behaviour
of the FIND TOOL in relation with volume indexing without being TOO technical so that the users can take full advantage of the
"fast search" of the FIND TOOL and also explain under what circumstances the function reverts back to its "full search" mode so
that we can avoid that.

System Parameters

Dopus v.10.2 x64
Windows 7 Ult SP1 x64
HDD with NTFS File System

The behaviour you're seeing is not due to the Find Tool itself, it is due to how Windows caches disk data.

If you list a directory, Windows will keep that directory listing in memory until the memory is needed for something else. If the listing is still in memory when you ask to read the directory again then the request does not have to hit the relative slow disk as it can be satisfied by the much faster memory.

Thank you for clearing things out...it would be great though if there was a possibility for the directory listings to be forced to stay inside the memory buffers...this would probably speed up the FIND TOOL and other relative fuctions as well.

We don't have any control over that since we don't write the operating system (Windows), only Opus itself. :slight_smile: