Optimize cellref data storing in the savegame
Object positions (a current one in the ESM::ObjectState and an initial one in the ESM::CellRef) occupy about 10% of save. At least we can try to do not store a current position, if the initial position is the same (allows to reduce save size by 4-5%), or do not store initial positions since we already have them in the ESM.We store gold value multiplier (a NAM9 field in the ESM::CellRef) for everything, but it is used only for money (for other records it is always 0). It is about 5% of save.We assume the mFactionRank = -1 for items in containers, but still store it in the savegameIOBJ header is used very often (just an every item in inventory has it), and occupies a lot of space in savegames (about 3% of save is just headers for objects in inventories). In theory we can store a count of records in inventory, and read them in the "for" loop.
Edited by Andrei Kortunov