1

I have a Windows folder with 100k files and folders, when I'm looking for a file it takes a while, while Windows is going through each folder, the next time I look for a file Windows has cached most if not all folders and its contents so the search is much faster.

So far this is common Windows behavior, however I'd like Windows to keep this cached item in memory until the pc reboots and not reuse/release the memory for other use. (ea. I want fast search results throughout the day)

Any pointers if this can be done? Additionally I am not looking for a program which builds a cache but a way to force Windows to hang on to this cache, like the pc starts, I do a simple 'dir /s' to get caching started and keep using the cache.

itpp13
  • 444
  • 2
  • 6

1 Answers1

0

Which version of Windows are you using? Windows 7 onwards supports indexing a particular folder for faster searching. The thread here:

How to add folder into windows indexing list with windows search api

Suggests that you can at least use a certain windows search api to programatically index a folder. I do not know if there is a C++ (or whatever other language you are using) library available.

Community
  • 1
  • 1
GlGuru
  • 756
  • 2
  • 10
  • 21
  • Yes I am aware of the index service and also use it but it does not re-cache folder contents after a reboot it only indexes 'contents', once a search is started the index cache is loaded into memory (which takes time) and the search for a file is then partially found in the index cache and partially where its located (which all takes time) until its all cached in ram again. After some time Windows could decide to reuse that ram and everything starts again which is my issue to somehow block this cache from going into the free pool. – itpp13 Sep 18 '14 at 21:18