Saving is highly inefficient wrt circular references
Posted: Fri Mar 16, 2018 6:49 am
Demonstration here: https://drive.google.com/open?id=13IZTW ... bypEkKoH_V
To reproduce, simply install and enable the mod linked above, and note that it takes a good deal longer to complete the save process than necessary, and in the process consumes an enormous amount of ram, and the save file itself is quite large, too. In extreme circumstances with 100 thousand or more circular references (yes, before you ask, I actually do have a use case for something that large), this can create a save file 10-100 times larger than the same file with the same tables, but with the circular references removed. Now, I can work around this, by only creating those references locally and not actually saving them, but I thought I would let you know that there is something very inefficient in the serialization process.
To reproduce, simply install and enable the mod linked above, and note that it takes a good deal longer to complete the save process than necessary, and in the process consumes an enormous amount of ram, and the save file itself is quite large, too. In extreme circumstances with 100 thousand or more circular references (yes, before you ask, I actually do have a use case for something that large), this can create a save file 10-100 times larger than the same file with the same tables, but with the circular references removed. Now, I can work around this, by only creating those references locally and not actually saving them, but I thought I would let you know that there is something very inefficient in the serialization process.