Memory leak when playing

Summary:
When i first got StoneHearth through steam, i loaded it up and started playing was very interested in it, but i found the game to start slowing down and i investigated to find out that i was using 90%> of my memory, but as i play my game now i keep my task manager open to keep tabs on my memory so i can save before i run out of memory and lose all my progress like the first time

Notes:
Not as bad as when i first started the game, but it still slowly happens

Version Number and Mods in use:
release-559 (x64)
System Information:
Processor: AMD FX-8350
RAM: 8Gbs
Graphics card: Radeon HD 6790

I know the problem, just upped my mem from 8 to 16 just so i can play more decent (really loving stonehearth :slight_smile: ) Although with lowering graphics and keeping less villagers it can be extended to quite a nice village

Before my upgrade i just had auto save on and although it takes a little from your system, the saving is more frequent and you can place more focus on playing instead of watching the performance of your system. It your choice ofcourse :slight_smile:

Okay, well I wanted to make sure that the bug is know to hopefully make the game better

they still have to optimize the game, guess it is to be expected :slight_smile:

I doubt more RAM really helps.

My computer has 32 GiB of RAM. What happens is that when I first start the game (and load a save) Stonehearth uses about 2 GiB. Then it increases at a rate of about 1 GiB per 30 minutes (so that after 2 hours it’s up to 6 GiB). However, as the RAM increases the performance decreases, and after 2 to 3 hours the game is so laggy that you’re mostly forced to do the “save, kill the game, and restart/reload” thing to restore performance (even though I’ve still got about 16 GiB of unused memory at that stage).

To try help narrow down the problem…

a) The problem is the game client, not the game server.

b) The problem has nothing to do with building (I have 40 hearthings and still haven’t built a single building of any kind - not even a little road)

c) I don’t think the leak has anything to do with any code written in LUA. I used “debugtools” to monitor “memory allocated by LUA” and it remains within the same range. I also hacked my game so that when the client cancels a party command it calls “collectgarbage()” to check if the problem was unused memory not being collected and it made no difference.

d) I waited until memory usage increased to about 6 GiB, then wrote down all the statistics shown in the “perfmon” tool (within “debugtools”). Then I did the “save, kill game, and restart/reload” thing, let the game run for about 30 seconds, then compared all of the statistics with what I wrote down earlier; and nothing was significantly different. Of course this doesn’t help much (almost all of the statistics are from the server not the client).

that is what i mean with the game is slowing down not the system which was the issue with just 8 gig according to my task manager. using 7,5gig of mem left not much for the rest. I’m able to play longer now, at a cost i personally was willing to pay.