Save File Size
issueid=3833 08-29-2015 09:19 PM
palandus
Number of reported issues by palandus:
Save File Size
Noticed some massive increase in save file sizes

I don't know if this is a bug or not.

I've been noticing that the save files have begun to get quite huge, and don't know if this is a normal issue or not. I have some "backup" saves for when my character was LV 11, and the save file size is about 300 KB. By about LV 15 it was 400KB. Then I noticed a sharp increase in size for when my character was LV 17, where it jumped from 500 KB to 2500 KB. Then on LV 18 it jumped from 2500 to 4000 KB. Then on LV 19 jumped from 4000 KB to 7000 KB. Now with my LV 20 character, the save file size is 8500 KB.

I don't have any logical reason to account for these massive increases in save file size jumps. My LV 20 save file is now almost 3x larger in size than the executable file Adom.exe, and if it gets any bigger, it will be larger than my save files for Skyrim.

I'd like to think that this is savefile bloat, but not sure what could be causing it. It doesn't really affect me, as I have tons of GBs of free space, but it is a bit worrying why it is bloating so fast.
Issue Details
Issue Number 3833
Project ADOM (Ancient Domains Of Mystery)
Category Windows 8.1 (NotEye)
Status In Progress
Priority 3
Affected Version ADOM r60
Fixed Version ADOM r65 (v2.1.0)
Milestone Potential work pipeline
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users adom-admin, jt
Tags (none)




08-29-2015 10:11 PM
Senior Member
The save file is pretty much a raw data without any (or with very little) compression. Try to compress it into .zip or .7z and watch it shrink to 2-3% of the original size.

I doubt you can call it bug, more like nobody deemed working on this worthwhile. By the way, my last game winning character produced a save file over 30 MB big by the end of the game whereas back in prerelease 23 characters with similar level of progress were producing 10-15 MB files. I guess it did get bloated a bit, though it doesn't really matter that much in the age of hard disk space counted in terabytes.

08-29-2015 11:03 PM
palandus
Interesting. I just raise the issue because when I played ADOM back in 2003, the largest my save files got to was about 400 to 500 KB by maximum level. So, I'm just curious as to what is causing the bloating.

08-30-2015 09:50 AM
Member
Are you counting the log file? In my adom_dat there's a file called adom.log that never stops growing into hundreds of MBs.

I guess it did get bloated a bit, though it doesn't really matter that much in the age of hard disk space counted in terabytes.
Saving the backup causes lag when playing ADOM though.

08-30-2015 12:00 PM
Senior Member
Sure, but that's not due to the file size, but because of saving not being done in a non-interruptive background thread, I'm guessing.

The .log file, looking at its content, does seem to be pretty cumbersome, and I agree that it shouldn't be that big. Some compression and reducing the dump to only the last executable run would probably help a lot.

08-31-2015 02:46 AM
palandus
Well, it is true that save file bloating often has no effect on gameplay (except in the case of Skyrim with script bloating which can corrupt the save file), its just that I'm wondering what is being stored in those files that causes the bloating.

Possible things could be:
1) In NotEye mode, all those blood stains could possibly cause some bloating.
2) Every item on the ground might cause some bloating, especially if you have a place where you store stuff (I personally store a whole ton of stuff in the crime town, in the building where the crime lord was and then cast a magic lock spell on it to keep out thieves).
3) The new dungeons might cause some bloating; I personally doubt it, but as they are new since the last time I played it, I suppose its plausible.
4) There could be some pointers not properly being deleted, and thus bloating the file.
5) Having extremely high numbers of kills "might" cause some bloat, though I highly doubt it.
6) Having extremely high numbers of spell charges "might" cause some bloat, though I highly doubt it.

09-02-2015 03:54 AM
Ancient Member
Quote Originally Posted by palandus
Interesting. I just raise the issue because when I played ADOM back in 2003, the largest my save files got to was about 400 to 500 KB by maximum level. So, I'm just curious as to what is causing the bloating.
Me too. The uncompressed savegame for my 1.1.1 winner (who visited almost every level) is 1.46 MB, i.e. it could almost fit in a floppy disk. Now you can get that filesize just by doing an UD dive and saving at the HMV. Some integers were changed from 32 to 64 bits to avoid overflows, and there are more things for the game to keep track of, but this still seems disproportionate.

12-27-2015 11:25 AM
jt jt is offline
Administrator
There are some reasons why save games are now larger than in the earlier versions:

- we made them compatible between platforms: some enum values are now stored as 32 bit whereas they were saved as bytes before
- we made them compatible between versions by adding versioned "chunks" for storing the data
- we needed to add some information that is used by NotEye (e.g. the blood stains), we use JSON objects for that

I now have optimized the code that handles the JSON data:

- we remove "neutral" values, e.g. 0 or empty strings
- we use shorter attribute names

Both optimizations already help to decrease the file size (e.g. one of my larger save games was reduced from 6,5 MB to 4,1 MB).

+ Reply