[0.13.15] Personal roboport robots extremely slow

Bugs that are actually features.
Post Reply
gHoST INFERNO
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Sun Nov 15, 2015 11:06 pm
Contact:

[0.13.15] Personal roboport robots extremely slow

Post by gHoST INFERNO »

Hi,

tl;dr - Robots from personal roboport getting extremely slow to find work. As in, I stand next to something that should be built, and I have the resources on me, but I have to wait 10-20 seconds until notice.

This is in multiplayer, but I don't think this matters. We have less than 1000 robots in our system, including all logistic networks in our map, and our personal roboports. This is in a situation where my personal roboport doesn't overlap with the normal logistic area, so there should be minimal interaction. Basically I'm building train tracks using blueprints, and when I place the blueprint, the robots immediately go out for "one round" of laying tracks, then come back, recharge, and go back into my inventory. Then I wait 10-20s without moving until they do the next round of deployment and this repeats. This gets clearly worse when there is a lot of work queued up, but this seems much worse than it should be. In this case here this was shortly after we ghost built a huge extension for the solar panel area, consisting of an additional 16 roboports or around 5000 things to be built (but as mentioned before, my latency that I complain about here is my personal roboport, and at a time when I had zero overlap with that huge area to be built up).

Is there any way this performance could be improved, waiting 10 seconds all the time is extremely painful ...

Thanks!

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [0.13.15] Personal roboport robots extremely slow

Post by Nexela »

It sounds like you have too many ghosts waiting to be built on your map.

Find some of those ghosts and remove them (or wait for the robots to finish them)

The more ghosts you have the longer it takes for robots to loop through them and get assigned.

gHoST INFERNO
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Sun Nov 15, 2015 11:06 pm
Contact:

Re: [0.13.15] Personal roboport robots extremely slow

Post by gHoST INFERNO »

I didn't have super many things ghost built, only something like 5000 - so even if the code is looping, 10-20s for 5k objects seems excessive. Additionally, couldn't this use a quadtree or something like it for the personal roboport?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13223
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.15] Personal roboport robots extremely slow

Post by Rseding91 »

Robots are dispatched at a maximum of 3 per tick in a cyclic loop over all ghosts. If you don't have enough robots it slows to a max of 1 per tick.

If you have 5000 ghosts and not enough robots that means it's going to take 83 seconds or 1.38 minutes for it to cycle over all of the ghosts once. It's not a matter of finding the closest logistic network - it's a matter of finding a network, finding a robot, finding an item and then sending the robot.
If you want to get ahold of me I'm almost always on Discord.

gHoST INFERNO
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Sun Nov 15, 2015 11:06 pm
Contact:

Re: [0.13.15] Personal roboport robots extremely slow

Post by gHoST INFERNO »

Hi Rseding91, thank you for this level of detail, that was very helpful.

Just to make sure I understand correctly: The way you assign ghost-building-work is by having at most 3 ghosts per tick "search" for a robot and supply item in its area, and you do this by looping over all ghost-built items in a loop, across ticks, ergo the 5000/60=83.3s?

What you describe seems to make total sense for a well-loaded & contained network, at least it takes quite a network until it becomes an issue that at most 180 robots per second are dispatched.

However, for personal roboports, any chance they could be given priority somehow (e.g. always check ghost-built things within the area of a personal roboport)? It seems for those this latency is more important than for others. This wouldn't help with such issues for normal roboports, but at least I don't have to stand there and wait ..

Cheers

bk5115545
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Apr 03, 2016 7:00 pm
Contact:

Re: [0.13.15] Personal roboport robots extremely slow

Post by bk5115545 »

Rseding91 wrote:Robots are dispatched at a maximum of 3 per tick in a cyclic loop over all ghosts. If you don't have enough robots it slows to a max of 1 per tick.
So I know it's not a bug but is there a way that I can increase these numbers?
There's that awesome "threads" slider in the options and these drone look-ups are doing a read-only operation (hopefully on the latency state) so it's very parallelizable.
I guess the real overhead is multiplayer synchronization for which drone pulls which resource but I have no idea here.

Example reason:
I have 1000 construction drones and 5000 ghosts. If we assume that it takes a drone 10s to complete it's task (get item, place item, recharge) then it should take 50s (5000/1000*10) to finish all these ghosts if the game were to launch the 1000 drones in a single tick. Obviously that's not feasible (lag spike) but dispatching only 1 drone per tick (since I don't have enough drones) means that it will take about 833s (5000/60*10) which is around 14 minutes.

Even if I can only handle dispatching 10 or 15 drones per tick, that lowers the time down to 83s or 56s respectively. From 14 mins to less than a min is a significant difference but it feels like the game should keep all of my drones allocated when I place a large chunk of ghosts. I'm essentially running into limits on the dispatch logic (I actually have about 500 drones and frequently lay solar blocks of 2000 entities where the task takes about a second because of well-placed storage chests).

Post Reply

Return to “Not a bug”