RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Emulation slow startup when roms are in network folder

    Scheduled Pinned Locked Moved Help and Support
    emulationstationetwork shareslow
    10 Posts 3 Posters 3.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xwons
      last edited by

      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.

      P mituM 2 Replies Last reply Reply Quote 0
      • P
        psyke83 Global Moderator @xwons
        last edited by

        @xwons

        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 both cache directory & state directory to a persistent storage location (i.e., a folder on your SD card). These are usually set to save in a tmpfs 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.

        1 Reply Last reply Reply Quote 1
        • mituM
          mitu Global Moderator @xwons
          last edited by mitu

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

          1 Reply Last reply Reply Quote 3
          • X
            xwons
            last edited by

            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.

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @xwons
              last edited by

              @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 pressing Select 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:

              f94a9e4c-1fe6-4e07-867a-dff8e227892c-image.png

              1 Reply Last reply Reply Quote 0
              • X
                xwons
                last edited by

                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)

                mituM 1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @xwons
                  last edited by

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

                  1 Reply Last reply Reply Quote 0
                  • X
                    xwons
                    last edited by

                    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?

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @xwons
                      last edited by

                      @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 the gamelist.xml from $HOME/.emulationstation/gamelists/<system_name>.

                      1 Reply Last reply Reply Quote 1
                      • X
                        xwons
                        last edited by

                        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!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        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.