MAMEWorld Central >> EmuChat
View all threads Index   Flat Mode Flat  

lharms
MAME Fan
Reged: 01/07/06
Posts: 813
Send PM
Re: bit of a speedup experiment (with verify)
12/01/16 08:49 AM


> 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.







Entire thread
Subject Posted by Posted on
* bit of a speedup experiment lharms 10/21/16 08:47 AM
. * Re: bit of a speedup experiment lharms  01/04/17 01:04 AM
. * Re: bit of a speedup experiment (with verify) lharms  12/01/16 08:49 AM
. * Re: bit of a speedup experiment R. Belmont  10/21/16 05:08 PM
. * Re: bit of a speedup experiment lharms  10/22/16 08:19 AM
. * Re: bit of a speedup experiment MooglyGuy  10/22/16 04:12 PM
. * Re: bit of a speedup experiment R. Belmont  11/02/16 05:01 PM
. * - Robbbert  11/03/16 12:49 AM
. * Re: bit of a speedup experiment lharms  10/23/16 02:16 AM
. * Re: bit of a speedup experiment Ziggy100  10/21/16 02:03 PM
. * Re: bit of a speedup experiment lharms  10/22/16 08:12 AM

Extra information Permissions
Moderator:  redk9258, URherenow, Tafoid 
0 registered and 31 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1387