Lua performance

Another side note, at the times of max slow down I am seeing alot of activity with the dark blue LUA bar, (lua job i think) and the cyan? (lua oc?) even at 10 hearthlings. I have ensured that i limit the number of floating items not stored, numbers of builds to 1, limit stockpiles to 1 and also that there are no resources left in inaccessible places.

1 Like

I generally don’t start seeing those hits until I get around 17 hearthlings and I’m pretty sure my system isn’t as good as yours. I wonder if it’s a difference in our play styles? I only keep stockpiles around until I can start making stone chests and once I have access to those, every stockpile goes away except for cooked food, which I limit to 30-ish items (to feed those annoying freaking pets).

@Spell_Blade I will try and see what happens when I remove a stockpile entirely and see what that does. I do however make heavy use of the supply shelves and completed item shelves to increase production efficiency. Maybe that causes issues as well as each supply shelf requires a “fill” job call from the lua? and maybe another check to see if it needs filling from another lua? @Relyss, would it help if i make a video and also upload my dxdiag for the devs to view?

That might make a difference because I don’t usually use shelves except mostly as decorations. Hmmm… curiouser and curiouser.

@Spell_Blade usually I use 2 supply shelves and 1 completed item shelf per crafter.

Right, after turning off all mods (pretty much everything in the steam workshop) and running a brand new game on vanilla. I have found the following with regards to game slow down:

Game is fine for around 2 hours.
it co-insides with increases in lua_job, lua_gc and ipf activity as well as huge jumps in ai
it may also be contributed to the number of fences deployed (more on that in a sec)
Game slow down seems to occur at 2 hearthlings more than with all mods installed (an increase from 12 to 14)
The game slows down noticeably during grouped attacks from the goblin chieftain.
Game speed seems to make a difference, i.e. whether i am on fast forward or not or even super speed. initially i could play on super speed all the time with no problems but with the increase in cobblestone fences and hearthlings meant a decrease in play-ability.
So far these are the observations on a new save on vanilla game with max settings fullscreen.

Now for the fence thing. I had 1 stockpile and 6 11x11 farming plots. all of which had 1 gate and 22 fence sections. This meant that every farm plot could be considered a separate entity as well as the stockpile. This then alters the patrol pathing of the footmen and defence teams. Could the increase in usage of decorations that force alterations of patrolling have a knock-on effect with the ai, lua_job and lua_gc?

I have the save still so if anyone wants to take a look themselves or something?

The savefile would be useful, yes.

We’ve already done some profiling and know more or less which things do we want to start optimizing, though with each change, other areas might get affected, so samples of laggy towns (or with idle hearthlings) are always welcome.