Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows XP slower to read text files at startup in C++; prefetch?
    text
    copied!<p>I have an application that is written in C++, Visual Studio 2005 running exclusively in Windows XP. When the application is launched it read a large number (> 20000) of text files (.nfo) which contain XML. Each file is 800bytes.</p> <p>When the application is launched after a cold reboot, it takes 10 minutes to read the files. However, if I close it and relaunch it, it only takes 10 seconds to read them. If I do a warm reboot, it also takes 10 seconds. If I clear the cache using the cacheset utility, it also takes 10 seconds to read the files. If I do a cold reboot of the computer, don't touch the computer for 2 hours, launch the application, it still takes 10 minutes to launch. </p> <p>I uses basic function from the standard library (std) to open/read/close the files. </p> <p>I believe that the problem does not come directly from the implementation of the application but from Windows XP. </p> <p>My current focus is given to Windows XP's Prefetcher. My application has a .pf file located in the prefetch directory. However, none of my .nfo text file are located in the list of the file to prefetch. For example, in the prefetch file associated with Internet Explorer, you can see that its temporary files such as pictures are listed in the prefetch file. I believe that if I could force my file to appear in that list; the open/read operations on them would be faster as Windows would already know where they are locted on the disk. </p> <p>Why aren't my files located in the .pf prefetch file along with my DLL? What is the condition for a file to appear in a prefetch file? </p> <p>Does this make sense? </p> <p>I was also wondering if there is a way to force Windows XP to pre-fetch a full directory or a list of files? </p> <p>This is an already commercialised product that is sold with a computer. Therefore, we have full access to tweak the OS. However, we have not plan to do extrem alteration to our application.</p> <p>Regards</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload