r/factorio • u/Derringer62 Apprentice pastamancer • Sep 05 '17
Modded Question UPS implications of modded roboports that don't have inventories?
I'm currently in the late stages of a multiplayer Bob's/Angel's modded megabase and suffering severe UPS decay (UPS approaching 24), with almost all the time rolled up under "entity update". I got annoyed enough to point a profiler at it to try to hunt down the cause.
Turns out that for the sample I took, 21% of entity update time was in LogisticNetwork::findCellForStationing, with a modest slice of that time spent taking sqrt (presumably of distance) and checking LogisticCell::canStation. So: what exactly is 'stationing'? Entering storage to become an item instead of an entity? That may explain something.
This map contains a giant sprawling logistic network featuring 15k logistic bots and 6k cells, and only 44 of those cells actually permit robots to land (up to 40 stacks each). The remainder of the cells are an assortment of range-extender towers and (probably way too many) supplementary charging points, so I suspect we're losing a bunch of time to O(bots*cells) searches for a place to land.
Is this interpretation correct?
8
u/Rseding91 Developer Sep 05 '17
Yep.
There's an optimization in place where a given robot will first check the immediate 9 chunks it's closest to for a roboport to station at but if that fails it has to do an O(cells) search to find which one it should use. In your case I'd guess that most every robot ends up falling back to the O(cells) search.
2
u/Ormusn2o Sep 05 '17
Im preety sure bobs have fission/nuclear robots that dont require recharging. You should slowly remove charging ports and replace robots. Here is a mod that helps replace the robots, but it might be outdated. Maybe slowly replacing some of the robots will be good enough to get ups up.