> From my testing with '-verifyroms pacman*' (with wildcard) I am getting about 9 to 15 > seconds faster reads fairly consistently. That is with wall clock time tests. >
Fiddled a bit more with this. Not sure of the side effects so I have not created a patch. I suspect it will break something
So I changed from std::map to std::unordered_map. Not much difference. I told the unordered map to start with a 64k buffer size instead of 0. That beats the std::map by 2 seconds (~11-17 seconds faster). So kinda meh and expected...
I know my files are 7z. So I flipped 7zip and zip order on trying to find files. No real noticeable change. So 'meh'.
Then I went back to procmon and found some more stuff to see if I could filter out.
My 'roms' setting in my ini file has 4 folders. That does seem to be much slower on 'file miss'. As it basically searches through all 4 folders for individual files and both 7z and zip. As expected and designed.
Now I dug a bit deeper. I changed osd_file::error osd_file::open in winfile.cpp to cache ERROR_PATH_NOT_FOUND errors. Now this has got me another decent speed up. This is because of the way it searches for individual files. It looks into a folder of the set name. But on a miss that folder will not exist and the next set of calls will also not be there because the path is non existent. So now I am seeing consistently 33-36 seconds faster on the verify test from above. Have not isolated it from the above change to see what it would do. Would need to dig into the unix ver to see if it could do the same thing. Had to do it at this level as this call eats the path not found error and turns it into a util::archive_file::error::FILE_ERROR. So from a level above I can not tell the difference and I need to for this to work right.
Was a bit hacky to get right as that method can also create directories with the right flags passed in. Have to see if I can simplify it.
Overall not too bad from 59 seconds to verify to 26 seconds on my last run. I also did a race between orig and my 2 new ways with just verifyroms. The orig got through the 'ones' the new one was pretty almost through the 'Cs' before I just killed it.
tl;dr? Opening things repeatedly that do not exist on a network share slows things down.