S
S
shasoft2020-04-16 11:55:31
API
shasoft, 2020-04-16 11:55:31

How to do a quick file search in C in Windows?

I do a search through FindFirstFile / FindNextFile and the directory with all the attachments costs 5 minutes.
At the same time, the Ctrl+L command in Total Commander (getting information about the directory) is executed in less than 10 seconds. But in the final information there is the size of all files. those. bypass is performed, but many times faster.
How to make such a fast implementation?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
#
#, 2020-04-16
@mindtester

I think you need to start with a quick google search for winapi files
and then increase the complexity of the queries to get to the goal. in addition to the algorithms of graphs / trees, there is also a file system that already knows almost everything that we need to
read this publication
https://habr.com/en/post/144712/
as a search direction indicator. I didn’t dig myself, because I don’t need it, so I won’t give specific recommendations on WinApi

N
Nujabes37, 2020-04-16
@Nujabes37

Learn graph traversal algorithms

P
pfg21, 2020-04-16
@pfg21

scan everything you need and load the names into a suitable database with all indexes and quick searches.
follow the changes by USN and update the info in the database.
search by db. and after the search, access the file directly.
you don't have tile cases ??

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question