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).