I am using a directory containing about 3,000 files. I know about NTFS streams that said CreateFile is slow to read files in the amount of 100,000 or millions. My number is not so high, but it still takes about 4-7 ms to create CreateFile, which is added when I open 3000 files. So my problem is similar to the post below. On some machines it is lightning fast, when I call CreateFile, and then on others, it is 4-7 ms. I tried the Fat32 and NTFS file system with no luck, it is slow on both. Same thing with Win7 and Win10, slow on both. The only thing I noticed is that the machines where it is slow seem to be located on machines that use SATA / RAID controllers and work quickly on machines with standard SATA. All machines use SSD drives.
As a side note: I'm doing the same thing as the stream below, as part of my experiment. I have a simple program that calls CreateFile and then CloseHandle. Nothing else and not so slow on some machines (4-7ms CreateFile) and fast on others, as described above. The next thread is a very similar question, but there has never been a good answer for it.
Why are windows so slow when opening files for the first time and is there a faster way
thank
dgraves
source
share