mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
The LaunchBox import wrote the whole game record into three hashes: once under its database id, and again under its title and folded title. The Switch TitleDB import wrote every entry twice, once per id it is looked up by. Both title indexes and the product id index now hold the id of the record they point at, and the reader follows it. Image lists also carried a `DatabaseID` repeating the field they are stored under, plus a `CRC32` no lookup reads. Measured on a full import of both dumps into the bundled valkey: 941MB -> 466MB of `used_memory`. An index written by an earlier import still holds whole records, so a lookup keeps answering off it until the next update rewrites the store. Fixes #4395 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>