Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Resource files for clones of the same game get duplicated and consume a lot of unnecessary space #1521

Open
kuya1284 opened this issue Jan 21, 2025 · 2 comments
Labels
feature New feature or request

Comments

@kuya1284
Copy link

kuya1284 commented Jan 21, 2025

Is your feature request related to a problem? Please describe.
It appears that when clones of a game exist, instead of those clones sharing the same resource files (i.e. screenshots and cover art), duplicate copies of those resources get downloaded from sources like IGDB or MobyGames. If there are a lot of clones, this would effectively consume a lot of unnecessary storage. Currently, my resources directory consumes 7.9 GB of space for my 24 platforms.

Describe the solution you'd like
Instead of downloading the same resource files for each individual clone, the same parent game/rom resource files should be used for each individual clone. Since RomM already has a mechanism for grouping "clones" (or in terms of RomM, "duplicates"), it seems as if that same mechanism may be leveraged to point to the parent game's resource files as well. This would help save on storage space, potentially cutting down the amount of space used by about 20 to 40%. Also, this would help avoid unnecessary download requests made to IGDB and/or MobyGames.

Describe alternatives you've considered
I haven't thought of any alternatives; however, I've thought about two approaches for how this could be handled. The first approach could be data-driven such that the resource references in a database table (if that's where the references are stored) for each clone could just point to the same resource directory that the parent game points to.

The second approach could be to just create symlinks on the filesystem for each clone to point to the parent game's resource directory.

Additional context
Here are screenshots showing 2 of 3 duplicated resources for the same game to demonstrate what I described above.

Image

Image

Image

@kuya1284 kuya1284 added the feature New feature or request label Jan 21, 2025
@zurdi15
Copy link
Member

zurdi15 commented Jan 21, 2025

RomM groups siblings (optionally) In order to make easier navigate and find different versions of the same game or just to make the gallery cleaner, but some users just uses different covers for different regions or versions.

Apart from that, this can cause additional issues: what if you delete the "main" version (the one that has the cover stored) but not the others? That will let all of the others without cover and you should scan them again.

And probably there will be more issues that I can't think about right now

@kuya1284
Copy link
Author

kuya1284 commented Jan 21, 2025

@zurdi15 If you delete the main version, I would imagine that something would take the place of the previous main version. The resource files could be moved to the new main version to help minimize the impact.

If each version of the same game downloaded completely different files from IGDB/MobyGames, then having those files stored in their own directories makes complete sense. However, so far, I've noticed most/all of my clones are the same files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants