Page 1 of 1

[slpwnd][0.11.22] Huge savegame in multiplayer

Posted: Fri May 29, 2015 10:47 am
by Ledjlale
Hi, we played a map for only 4 hours. We were 3 players.
At the end, the savegame file is 60Mo (without the replay file)

When I played alone for more than 70 hours, the file was only 15Mo.

I tried to load the mp savegame and save it again but it doesn't change the size.
Could you give me any clues from the attachment on why the file is huge while we don't have many visible objects? (maybe a map configuration issue/bug?)

savegame

Re: [0.11.22] Huge savegame in multiplayer

Posted: Fri May 29, 2015 12:17 pm
by FishSandwich
It looks like the level.dat file is huge for some reason. I got the save file down to 3MB by calling killallenemies in the console.

Code: Select all

/c game.killallenemies()

Re: [0.11.22] Huge savegame in multiplayer

Posted: Fri May 29, 2015 2:59 pm
by Rseding91
FishSandwich wrote:It looks like the level.dat file is huge for some reason. I got the save file down to 3MB by calling killallenemies in the console.

Code: Select all

/c game.killallenemies()
Most likely biter path finding data.

Re: [0.11.22] Huge savegame in multiplayer

Posted: Fri May 29, 2015 4:49 pm
by Ledjlale
Thanks for your inputs. This command just work fine :)
With F5 command, we can see that the "Path finder" is set to 1.000/0.563/1.800. And after the killallenemies command, it is set to 0.001/0.000/0.300

I think that I didn't get this issue in my solo game because I set it in an infinite world (even with the max of ennemies). So maybe that bitters depends of the players scope while it's is not the case in a finite world.

Re: [0.11.22] Huge savegame in multiplayer

Posted: Fri Jun 05, 2015 8:51 am
by slpwnd
Thanks for the report. Yeah, there seem to be some wastefulness going on with path find data. We will look into that.

Re: [slpwnd][0.11.22] Huge savegame in multiplayer

Posted: Mon Jun 08, 2015 3:23 pm
by slpwnd
So it turned out there was no explicit bug actually=)) The thing is that the landscape is super path finding unfriendly. there is a very big lake around the base with a sort of thin section close to player base. So the pollution travels over the thin section and induces biters on the other side to attack. However pathfinding for those guys will take millions of steps to find. Hence if there was a pathfinding in progress (which it was) there was a huge memory usage. We have solved this for now by adding a relatively straightforward cap on how long the pathfinding can take (in number of steps relative to the minimal length of the searched path). If it takes longer than this cap then the path is marked as not found and after a retry or two the entity (biter) will commit an exemplary suicide.

The memory usage went down to about 5MB immediately. There are more tweaks we will do in this regard in the (hopefully) near future. Like hierarchical path finding which should be able to find paths like these much much faster than the current approach. However for now (0.12) the problem is considered solved.