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

Compress RDB files #1499

Open
steven-sheehy opened this issue Nov 25, 2024 · 2 comments
Open

Compress RDB files #1499

steven-sheehy opened this issue Nov 25, 2024 · 2 comments

Comments

@steven-sheehy
Copy link
Contributor

steven-sheehy commented Nov 25, 2024

I would like to propose that libretro consider compressing the RDB files. This would require support in libretro to read this format but that should be relatively straightforward. This would be useful for the following reasons:

  • It reduces the database size from 117.0 MiB to 34.6 MiB (3.4x reduction) using gzip
  • Highly compressible since they contain a lot of duplicate strings and numbers.
  • It shrinks the size of the release artifacts for every downstream system (retroarch, batocera, retrobat, rocknix, etc.)
  • They're already not editable plaintext so might as well store them as efficiently as possible.
  • They're copied to handhelds where storage is a premium that can be used for games or the OS.
  • It would reduce the size of the git checkout of this repo.
  • Might improve performance slightly since it reduces the amount of data to read and storage not compute is usually the bottleneck
@RobLoach
Copy link
Member

For smaller devices, it can be appropriate to remove some of the DBs that don't apply.

Sinclair - ZX Spectrum and Commodore - Amiga are the largest ones, both at about 15MB.

I just removed the description properties of the above, as it's duplicate data. Next build they should be a little smaller, at least.

@steven-sheehy
Copy link
Contributor Author

Thanks for the comments @RobLoach. Removing non-applicable files is a manual step that users can do, but I don't think many people even know about these files to find and remove them. Removing duplicate data will help a small amount, but I think compression provides easy, dramatic savings.

Do you think this is something that might be received favorably by libretro? Should I open a ticket in libretro to support both compressed and uncompressed files as a first step?

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

No branches or pull requests

2 participants