Emulation slow startup when roms are in network folder
-
My rom collection is currently located in a network share in a NAS. Probably as a consequence of that, emulationstation seems quite slow to start, taking several minutes. I guess that it is scanning for all possible games for every system.
My question is, is it possible to "skip" this process, so emulationstation just loads the games from a database (pointing to the path to each game), so it starts immediately? Just like Kodi works, that after scanning for movies/tv episodes, startup times are very fast.
Thanks in advance.
-
After the first run of EmulationStation, if you restart EmulationStation from the menu, is the subsequent loading of items much faster compared to that first boot? If yes, there may be a way to improve the performance of first startup.
Try editing your smb.conf in
/etc/default
and change bothcache directory
&state directory
to a persistent storage location (i.e., a folder on your SD card). These are usually set to save in atmpfs
location (likely somewhere in/var/cache
), which means that any information cached by Samba is lost every time you restart, but if you set them to persistent storage, then enumeration of files on your shares during first boot may be quicker.Note that I haven't tried this, so I'm not certain if this will yield any appreciable improvement.
-
@xwons To avoid re-scanning the ROM folders at the start, there's a setting in Emulationstation - Parse Gamelists Only:
You should enable it once you have your ROM collection set-up, since adding new ROMs will not show them in the list on restart.
-
Thanks for your answers!
I don't think the cache workaround will work, since I access that shared folder using sftp.
I tried the "parse gamelists only", and indeed, now it loads much faster. However, for most systems, games appear to be duplicated (there are two entries for each game), and in some cases, each game appears up to 5 times (sega mega drive, for instance). I don't know if that's an issue with the gamelists.xml files or not. I use pre-made gamelists.xml files that already include all the metadata and link to cover arts and such, but as far as I can see, games are not repeated there. It's weird.
Anyway, thanks for your help, and if you have further suggestions for the duplicated games issue, I'll be listening.
-
@xwons Post the
gamelist.xml
somewhere to take a look and indicate which duplicates your encounter.
You might have the same game released for different regions with names like Game [U], Game [J], Game (Europe), etc. which are cleaned by Emulationstation and appear all as Game. You can check the filename for each game by pressingSelect
when the game is selected in the list and then choosing Edit Game Metadata - this will show you the filename for the game in question, allowing you to trace which files/roms produce the duplicates: -
No, I don't think that is the case. A year or two ago I already cleaned up my library and only used romsets in which roms are not duplicated in any way.
I also made sure there were no hidden files in the rom folder (files starting with a ".").
Since this issue only happens when the "parse gamelists only" option is enabled, it has to do with the gamelist.xml file in each folder. And I just checked, and indeed, it seems that many entries are duplicated (e.g. one for game.zip and another for game.bin). I didn't create or edit these gamelist.xml files, I got them from internet I think.
Is there any way to clean up unused games in the gamelist? (I won't be adding or removing any games soon)
-
@xwons said in Emulation slow startup when roms are in network folder:
Is there any way to clean up unused games in the gamelist? (I won't be adding or removing any games soon)
That's easy - remove the gamelist, disable Parse Gamelists Only and restart Emulationstation. This will create a correct
gamelist.xml
(no duplicates), afterwards you can enable the Parse Gamelists Only option back so the startup is fast. -
But that will remove all the game description, path to the video preview, marquee, etc., right?
Also, I noticed that I have two gamelist.xml files for each system. One in the rom folder (e.g. /home/pi/RetroPie/roms/genesis) and another one as a hidden directory at /home/pi/.emulationstation/gamelists/genesis.
Which one is the good one?
-
@xwons said in Emulation slow startup when roms are in network folder:
But that will remove all the game description, path to the video preview, marquee, etc., right?
Yes, of course.
Also, I noticed that I have two gamelist.xml files for each system. One in the rom folder (e.g. /home/pi/RetroPie/roms/genesis) and another one as a hidden directory at /home/pi/.emulationstation/gamelists/genesis.
Which one is the good one?Emulationstation tries to find a
gamelist.xml
in the ROMs/System's folder, if it doesn't find one it will load thegamelist.xml
from$HOME/.emulationstation/gamelists/<system_name>
. -
Ok, thanks.
I found a script to cleanup gamelist.xml files in emulationstation. I think I'll give it a go.
Thanks for your help!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.