MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

lharms
MAME Fan
Reged: 01/07/06
Posts: 908
Send PM
bit of a speedup experiment
10/21/16 08:47 AM


Trying a bit of an experiment.

While looking at something else I noticed in procmon that MAME has an interesting habit of reopening files that do not exist. Now on a local file system this is probably not too bad. But on a network filesystem it is sort of bad.

Current results are kind of promising.

I added in a std::map to cache the negative 'no file found' results returned from open_funcs[ i](m_fullpath, zip) in the fileio.cpp file in the attempt_zipped method. Just bashed it in as a global for a quick test. Would be nicer to make it part of the class.

I fed in '-verifyroms pacman' for the parameters

It went from 2574 file events most of which were negative to 1251 file events. A good portion of the remaining were dll loads and mame.ini reads (which oddly it seems to do twice).

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. Would need to add a bit of logging to get it more exact. At least for my network.

Now obviously the best case would just to be to run the whole thing from a local machine. Do not have the room at the moment. I suspect it would still help but not as dramatically.

Just for an interesting test I did a drag race between the two methods for verifyroms. The old way got to 12 roms before I killed it. The new one got through 76 roms before I killed. Killed them within 1-2 seconds of each other. Not bad and noticeably faster. Individual game load does not seem to have much difference at all.

Downside to this method is it probably just looks straight up like a memory leak with an ever growing map. Though I have not noticed much in memory manager. Another downside would be if someone starts the prog up and then afterwords drops files in. It would think the files do not exist until restart. Also it probably would be better to run down why it is trying to open paths that do not exist in the first place. But I was a bit bored and have been meaning to try this for a few weeks.

Edited by lharms (10/21/16 08:49 AM)







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
. * - RobbbertModerator  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:  Robbbert, Tafoid 
0 registered and 324 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1891