[1.1.88] Very slow missing materials counting

Bugs that are actually features.
Ayamari
Inserter
Inserter
Posts: 37
Joined: Sat Nov 12, 2016 10:51 am

[1.1.88] Very slow missing materials counting

Post by Ayamari »

It seems that the latest version of Factorio is a lot slower at counting ghost entities that need construction materials. It gets there eventually, but seems to take a lot longer.

I did what I usually do, placed a bunch of ghost miners, walked around, tooltip said ~200 miners missing, went back home, took miners, came back. Turns out I am now ~70 miners short. That happens a lot, I am aware that Factorio did optimizations there spreading the process over multiple frames, I might have missed something. No big deal, I go back, take the 70 miners, com back, still ~20 miners missing. That is unusual, but hey, maybe I was too much in a hurry. Do that again, and still 7 miners missing. This is a first. I grab those, and am still short, but this time I notice that the tooltip says I am missing 3 miners, but there are still 7 ghosts. I stay there, right next to them with a stopwatch - it takes Factorio 1 minute and 38 seconds to find all those 7 ghosts, when I am standing right next to it. This feels like it is significantly slower than it used to be.

While not strictly a bug (Factorio finds them all *eventually*) it feels a lot worse. I never paid much attention to this, since two trips back and forth were always enough for me to get this, so can't really say how long it took in earlier releases. But right now it feels like this has become unreliable and not trustworthy. I can no longer look at the tooltip and grab that amount, since it is very often wrong.

bug.jpg
bug.jpg (704.85 KiB) Viewed 1207 times
Attachments
factorio-current.log
(9.09 KiB) Downloaded 50 times
short-stacked-trains-3.zip
(29.24 MiB) Downloaded 50 times
bug.webm
(2.26 MiB) Downloaded 40 times
Ayamari
Inserter
Inserter
Posts: 37
Joined: Sat Nov 12, 2016 10:51 am

Re: [1.1.88] Very slow missing entities counting

Post by Ayamari »

Forgot to attach my local version of uranium logistics mod. It doesn't do much and I don't think I even used them in this save yet at all, but might be needed to load the save.
Attachments
deadlock-uranium-logistics.zip
(2.76 KiB) Downloaded 41 times
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: [1.1.88] Very slow missing entities counting

Post by SoShootMe »

I haven't noticed any change in behaviour; I have always noticed "missing materials" counts being incomplete, and slow responses, when the number of ghosts is large. This arises from the way they are processed that is done in order to limit performance impact, trading one source of bad UX for another.

Though not quite the same, a workaround is to create a deconstruction planner filtered to entity ghosts (Unsorted tab). With the planner in hand, you can drag and hold a rectangle over an area to get a count then clear cursor (Q) rather than releasing the drag (or undo if you release by mistake ;)). The same idea also works for module requests, although these only exist after the entity is placed.
Ayamari
Inserter
Inserter
Posts: 37
Joined: Sat Nov 12, 2016 10:51 am

Re: [1.1.88] Very slow missing entities counting

Post by Ayamari »

I am aware of the performance optimizations, that is why I was not surprised to have the wrong number the first time around, and not shocked when it was wrong the second time around. But it just felt like this was wrong too many times this time. I did not expect it to take over a minute to find the right number of missing miners.

The included save has 3 stamped mining outposts and a couple of partial rail blocks missing. The mining outposts are ~4000 entities each, no idea how many rails are missing, but let's say there are ~5000 rails missing. That adds up to ~17000 ghosts on the map (almost all outside of any roboport networks, but that might not be relevant), lets round it up to 20000. 1m 38s at 60fps is 5880 frames, that is 3.4 ghost entities per frame. Even if my estimation is wrong by an order of magnitude, 34 ghosts per frame would not sound like a lot.

Thanks for the tip, I didn't know I can use the deconstruction planner for that!
Loewchen
Global Moderator
Global Moderator
Posts: 9274
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [1.1.88] Very slow missing materials counting

Post by Loewchen »

Well, the alert does not say what you think it says first of all. The game does not tell you how many items are missing, the game tells you how many entities (as in construction jobs) could not be performed because items were missing.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14343
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.88] Very slow missing materials counting

Post by Rseding91 »

Thanks for the report. This logic has not changed in several years. The game will process up to 3 jobs per tick, with a failed job exiting early (per force per surface). Each alert lasts 10 seconds so you will at most see 600 alerts before they start timing out.

At 20,000 jobs to process (assuming all in range of a roboport and all having items to build plus robots ready) it will take the game a minimum of 6,666 ticks or 1.8 minutes to go over them all once. Assuming most jobs fail to have items to build or robots to build them it will take a maximum of 20,000 ticks or 5.5 minutes to go over them all once.

The construction logic is built for you to have the items and robots to build things; not to stamp down tens of thousands of jobs the game can’t do anything with and so if you do; you have to wait for it to process them. Or you could remove the ones outside robot coverage and put them back when you actually plan on letting the game build them.
If you want to get ahold of me I'm almost always on Discord.
Ayamari
Inserter
Inserter
Posts: 37
Joined: Sat Nov 12, 2016 10:51 am

Re: [1.1.88] Very slow missing materials counting

Post by Ayamari »

Thanks for the clarifications!

As for the alert not saying what I think it does - that is not relevant, because that was exactly how that alert is used. Until Friday morning, I was not aware of any better method of answering the question "How many items am I still missing?".
Post Reply

Return to “Not a bug”