- marked as minor
- marked as enhancement
Cache Checksums to the DBInfo File
I would like to cache the checksums of the ROM’s in a database to the DBInfo file.
This is mostly needed with N64 since N64 ROM’s are both large, and compressed as .bnz. The checksums are scanned every time a database loads in general. I forget all that uses it before, but now with the Compatibility Rating feature I am working on, its more crucial.
This would probably speed up loading GBA too mostly. But to some degree everything else.
Comments (6)
-
reporter -
reporter Looking into this… we kind of already do this.
Kind of, because we save the checksums of the ROM files… along with ALL files… when we Sync a database. So the file/checksum list only ever exists on the SD card.
We would need to change things to list the files locally too.
The question is, how best to do this? When?
Current thinking is… just generate the list at the same time as current. But it feels like it should be more often. The most logical time would be when Saving. This would require more of a significant design change though, and I’m not sure what all would be effected by changing it as such. The file/checksum tracking stuff, as currently is, is mostly for mods and image/ROM changes. So cave knows to upload new files only.
Either way, this seems best. We just access DBInfo.Files, iterate through, compare against title.ROMPath_Local, and get/set a checksum.
-
reporter So… turns out I was looking at the wrong class, and we did not already log the checksum.
I ended up logging them by repurposing that same class I mistook. In the process, the DBInfo file has switched from using a Dictionary list for the files, to a collection of that class.
I had to write some conversion code so testers dont have issues their their previous DBInfo files. Need to remove that later.
I have tested it with SNES, and it works. There was some issues, but those were mainly from the database I was testing with.
Still… there are some remaining issues. I cant load my N64 database yet, because its local DBINFO file lacks FilesInfo data and crashes.
How we are handling things now is… the localFiles list that was previously generated during the Sync Database process, is now generated when saving. Checksums are pulled from the AllTitles for the active database. Those GameTitle checksum properties are filled when the titlesdb entries are parsed, and a ROMPath_Local file exists.
Unrelated, but I see 2 bugs. Images getting set to the generic ones and not reloading when using Change Database Version, and changing the Code value is not updating rom/sig file names.
-
reporter Addressed the issue with loading databases that do not already have File/FilesInfo data in the DBINFO file.
N64 is loading better than it was. But its still slower than other. Again. Probably just debug logging, or maybe that that DB is too many games.
-
reporter I forgot to save the checksum to the gameTitle when Importing a new ROM. Addressed now.
-
reporter - changed status to resolved
- Log in to comment