Nanobots: Early Bots

by Nexela

Early ghost building robots, A special nanobot gun automaticly revives blueprint ghosts near you if you have the items in your inventory. Also reprograms personal construction bots to deconstruct items on ground.

Tweaks
2 years ago
0.14 - 1.1
187K

b Significant performance hit in large logistics network

2 years ago

Been having freezes happen every once in a while in a game, seemed like odd timing as it didn't seem entirely consistent but eventually that was discovered to be the Logistic Network Interface a couple of times in a couple different logistics networks.

Basically the issue is that using a Logistic Network Interface building set to pick up items and trees the game freezes for about 4-6 seconds every 66.67s in logistics networks that are very... "large" to put it lightly.

Found the issue by first profiling the factorio application and found it was an issue in the Lua interpreter being called during the radar scan event. Profiled the Lua code and found that it was all in the nanobot radar on_sector_scanned callback.

2 years ago

Are the nanobots settings at default? How many interfaces are in the large network? What signals are being used?

Some things to try
/Nanobots reset cell_queue
It is possible there is old queued stuff that is causing the queue count to take forever as it seems to be horribly unoptimized........

Limit it to just the closest roboport by setting the closest robobort signal

I will also look into adding a range option to the closest roboport signal to somewhat control the amout of networks it scans.

2 years ago
(updated 2 years ago)

Are the nanobots settings at default?

Default as fresh install.

How many interfaces are in the large network?

Just one, though there were about 2200 roboports spanning a rather large area.

What signals are being used?

  • -100k to harvest trees.
  • -100k to harvest fish.
  • 1 to deconstruct finished miners.
  • 1 to mark items on ground for pickup.

Some things to try
/Nanobots reset cell_queue
It is possible there is old queued stuff that is causing the queue count to take forever as it seems to be horribly unoptimized........

Let me enable it again and test:

  1. Turned the Logistics Interface with the above settings back on (convenient on/off switch in the combinator part of it).
  2. Waited for the 'radar' part of it to scan, it did indeed freeze again, though only for about 1 second of the original 3 to 4 seconds.
  3. Ran /Nanobots reset cell_queue and it printed Resetting cell_queue.
  4. Waited for the 'radar' part of it to scan, it froze again this time for 4-5 seconds.
  5. Waited again for confirmation, same 4-5 seconds.
  6. Turned it off again to keep other players from yelling at me. ^.^;

Limit it to just the closest roboport by setting the closest robobort signal

That does fix it and I tested it before, but I'm wanting it to span the whole base for general cleanup, so I don't necessarily need it to respond quickly to things being scanned (although auto-marked dropped items within such a logistics network via the script callback would be a convenient optimization). Even just scanning, say, one chunk in the logistics network per tick would be fine for me (or perhaps even a single chunk across multiple ticks if it has a number of things like dropped items or trees or whatever to process), sure it will take a long time to process every chunk in the entire logistics network, but I don't need it to be responsive (hmm, the 'quickness' of the processing could possibly be another signal?).

I will also look into adding a range option to the closest roboport signal to somewhat control the amout of networks it scans.

Entire network on the main factory is preferred, the general cleanup is quite valuable on the set of mods being used.

New response