You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time I save the same world after loading, the world grows. This happens even if I save an empty world. This also happens with both Binary and JSON serialization.
I've attached two copies of the world JSON, once from the first save, and again after loading and saving again. note that it keeps growing every time I save and load, not just the first time.
I dug a bit deeper after this and it seems to do with the way the capacity is calculated, and serialized. I attempted serializing/deserializing the capacity of just a single bucket instead of the total capacity, which seemed to partially fix the issue, but it would still grow in some cases so I moved on to other things.
The text was updated successfully, but these errors were encountered:
I found it. Firstly we set capacity in JaggedArray constructor. Then we EnsureCapacity and check newCapacity < Capacity (They are same by constructor) so it increases capacity again..
I think fix should be simple @genaray@richdog
Upd. I tried to remove world.EnsureCapacity(versions.Capacity); in serializer. It helped a bit, but still leaking.
Every time I save the same world after loading, the world grows. This happens even if I save an empty world. This also happens with both Binary and JSON serialization.
I've attached two copies of the world JSON, once from the first save, and again after loading and saving again. note that it keeps growing every time I save and load, not just the first time.
world-empty-1.json
world-empty-2.json
I tracked it to this point:
I dug a bit deeper after this and it seems to do with the way the capacity is calculated, and serialized. I attempted serializing/deserializing the capacity of just a single bucket instead of the total capacity, which seemed to partially fix the issue, but it would still grow in some cases so I moved on to other things.
The text was updated successfully, but these errors were encountered: