Bottleneck

by trold

A tool for locating input starved machines.

Utilities
30 days ago
0.13 - 2.0
257K

g PC load

8 years ago

Awesome idea, exactly what i was looking for! My fps dropped about 30% when enabling this though so i'm wondering if there's anything you can do to significantly lower the pc load for this mod.

8 years ago
(updated 8 years ago)

Yes, there is something that can be done. Right now, the state of all machines is tested for every game tick, which might tank performance on big factories. There are several possible fixes. The easiest would be to reduce checking to e.g. every 5th tick. This would reduce the accuracy, so this should probably be a setting for the user to control. I need to look into how this is done in a user friendly manner. Ideas are most welcome.

8 years ago

I see.. Shouldn't polling every ~10 secs be more than enough? Otherwise you could maybe make it user initiated. As in; no automatic polling, just poll once when the user requests it and leave the lights on for a minute orso.

8 years ago

Testing within a specific range of all players, maybe only after a certain research is researched and maybe only while holding a tool in hand or so would make it significantly more performant.

8 years ago

I've given it a bit more thought, and have come to the conclusion that sampling has to be a lot more intelligent. Simply sampling once every N ticks won't work, since this might perfectly sync up with when the machine happens to be working, and thus not correctly identifying a bottleneck.
I have a few ideas for how to get this to work, without the mod taking as much CPU power as the rest of the game, and without sacrificing accuracy. But until this works, the mod will be a CPU hog.

New response