[Bug] Improve load times of games with many save states
RomM version 3.9.0
Describe the bug When a game has lots of save state files, if you click into that game on the homepage, it spends a while retrieving them. For one game I have ~300 save states (a bunch of the files for these are deleted, but the dB entries remain. Still, this could occur naturally)
It would be nice if romm lazily loaded these states because they aren't used if you're just looking at the details.
For the best solution, we could query the entries in the db based on descending creation date and add a "see more" button to go further than say 20 states, which would only return the full set then.
To Reproduce Steps to reproduce the behavior:
Go to a game, save a state file, copy it like 300 times and upload them to romm.
See performance slowdown when interacting
Expected behavior A clear and concise description of what you expected to happen.
Should be snappy, can take 40secs for a large amount of files
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS] Ubuntu 24.04
- Browser [e.g. chrome, safari] chrome/android chrome/kiwi/edge/brave
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
This may also be applicable to save games as well as save states. (But they're generally not so readily produced from emulators)