[b1658] Optimisation Report

Not sure if this really counts as a bug per se, but thought I’d start a topic on the optimisation stuff in this release.

In short, it’s much improved, although working on extra-large structures still causes some noticeable FPS lag - just not as much as previously.

Exhibit A:

Note the CPU use by Stonehearth. Later in the same game, I did not notice the FPS lag when the builders were at work exclusively on the two smaller structures’ floors, and not the large one. For reference, the large one is a 65x65 flat platform, and the two smaller ones are 15x40 structures.

1 Like

Quick update on this: watching my slaves peons hearthlings get to work on my 65x65 structure, the FPS lag spike seems to occur at the creation of the new block, just after the smoke particles appear.

My guess would be that the game is recalculating the pathfinding at this point, possibly for every mobile entity nearby, which might explain the issue. As squared numbers obviously increase quite dramatically (1, 4, 9, 16, etc), calculating a whole bunch of such paths for every unit separately each time a large building is updated or altered is a problem.

One possible solution: could the game be told to calculate pathing for unit types? Eg, all your hearthlings share one pathfinder, all the goblins share one, the critters share one, etc. If you only have to calculate it once instead of seven times (in the case of your starting population of 7 hearthlings), might this help?