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

lharms
MAME Fan
Reged: 01/07/06
Posts: 815
Send PM
Re: bit of a speedup experiment
01/04/17 01:04 AM


With a bit of nudging from Vas I dug a bit deeper. I think it is a bug in part_of_mediapath.

The if condition is this
if (path.compare(mediapath.substr(0, mediapath.length())))

Probably should be this
if (mediapath.compare(path.substr(0, mediapath.length())) == 0)

It is comparing the wrong parts of the string and not checking for the 0 result. I think the intent is to keep it to the rompath dirs. However it is pretty much always letting it through.

This is as fast as my cache way. There are a couple of other minor tweaks that could be made. But those do not do anything significant.

The second cache I added breaks the ability to add files/dirs randomly. It is about 8x faster but I am going to leave it as experimental. Samba shares are apparently really bad if you have a path_not_found miss.







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 
1 registered and 42 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1391