mrchrisster / MiSTer_SAM

154 stars 23 forks source link

Load time slowdown & startup/shutdown issues #119

Closed wyrfxrssn closed 2 years ago

wyrfxrssn commented 2 years ago

Yo yo yo. I'm experiencing slow load times while running super attract mode for a little while. The first few games get loaded quick as they ever are, but after a little while (maybe fifteen minutes) the load times get considerably longer. Navigating the OSD menu also slows down when this happens. When I enable PSX in the SAM settings ini, it has stuttering issues that aren't present when playing normally, and I believe it may be related to this issue.

Everything is up to date (ran update_all last night and reinstalled SAM).

Also worth noting that I'm having some difficulty launching and closing SAM - running mistersam_on and pressing down doesn't start SAM, pressing up to go to the menu and starting it from there also doesn't seem to start SAM. Only way I can get it to launch is to run mistersam_on and wait five seconds for it to update, after which it immediately quick launches SAM. mistersam_off then does not turn SAM off - rebooting the MiSTer is the only way I can turn it off at that point. It also seems to ignore any inputs and move on to the next game once the set time is reached regardless of controller/keyboard activity.

I set my MiSTer up for video capture so if you'd like me to recreate the issue on video I am willing and able.

As always, appreciate y'all for making this thing. <3 <3

mrchrisster commented 2 years ago

Hey hey,

Thanks for the detailed info.

We recently changed the way SAM works. SAM now creates a romlist for every new core, meaning it writes all games you have in a folder to a file ( /tmp/.SAMlist/snes_romlist for example). It then deletes every game you play off the list. This way a game will never show more than once until the list is empty and gets repopulated. Since it only collects all games per core once, it should not slow down over time but get faster. The advantage is it only needs to access your filesystem on the SD or USB drive once per core startup. After that it will work with the romlist for fast access. I assume the slowdown is because SAM encounters a core with lots of games (like snes) later in the shuffle and then takes a while to create the romlist.

I can look into the menu/button detection issues after next week, sorry for the troubles. I changed one thing just now, which should hopefully repair pressing down in the menu again.

wyrfxrssn commented 2 years ago

After an update today, everything appears to be working for me - not getting slow game loads, disc-based game slowdown, and SAM starts at the menu with a button press (and is stopping with a button press successfully as well). Before the update, I split larger game libraries into subfolders to see if it would affect the load times/slowdowns, buuut I'm not sure if it did anything since I had to update it in order to run it (and I don't know if lists are generated for entire core libraries or for each subfolder anyway). Shout out to y'all for the continued SAM support! MiSTer fans appreciate it.

mrchrisster commented 2 years ago

Glad to hear my update today fixed it for you. A couple things were broken so thanks for bringing them to my attention! Game lists are now being created only once and are stored on SD. This way we have the best of both worlds: No repeat games and no slowdowns.

With every design decision with SAM we always try to have a minimum impact to the system and this seemed like the best compromise!