[14.21] Very slow unloading with large circuit network

This subforum contains all the issues which we already resolved.
Vegemeister
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Sun Dec 04, 2016 9:18 pm
Contact:

[14.21] Very slow unloading with large circuit network

Post by Vegemeister »

System: Fedora Linux, x86-64

Steps to reproduce:

1. Load this save file: https://drive.google.com/open?id=0B_QZW ... mhXcy0zY1U

2. From the esc menu, attempt to quit the game or load the save file again.

Observed behavior: Game hangs for a very long time. More than 3 minutes on my machine:

loading time: 7.98 s, maybe a little less.
Quitting time: 3:48.92
Re-loading time: 3:34.92

Expected behavior: Quitting is instant, re-loading takes about the same time as loading the save in the first place.

Additional information:

I ran the "perf top" command while the game was hung. Here are the culprits, starting from the top and ending with the last function belonging to the factorio executable:

Code: Select all

  40.24%  factorio                         [.] CircuitConnector::markVisited
  11.24%  factorio                         [.] ElectricPole::getOrCreateCircuitConnector
   5.85%  factorio                         [.] CircuitConnector::convertToNetworkRecursive
   0.82%  libxul.so                        [.] 0x0000000000838626
   0.81%  [kernel]                         [k] update_blocked_averages
   0.77%  factorio                         [.] CircuitConnector::onNetworkConnectionChange
   0.62%  i965_dri.so                      [.] _init
   0.59%  factorio                         [.] CircuitConnector::getConnected
I think this problem is associated with the densely interconnected circuit and power network run between the train tracks that go to the south. The purpose of this arrangement is to be fault-tolerant against the destruction of any 3 adjacent power poles, so that I don't have to go out and fix it when the biters stampede across the tracks. Building this was a failure to follow the YAGNI principle and I'm going to workaround this problem by ripping it up, but I don't think it should be necessary for the game to do any work at all to un-load a map.

In case you want to try to reproduce it without loading up a save with so many mods, here's the blueprint for a segment of track:

Code: Select all

H4sIAAAAAAAA/71bwW7jNhD9FcOHnuzWomXZwUK3fkJvRRF4bSIrRJEMRUESGP73KraDFUcUOW+S8akdLM03fHyPM6GkfT0p6922nNznx2JXV8/58VhUe/uW
J7Pn4qHalvmxfT/YfFq09mk6q7ZP3f8326Kcnk6z61ATGLqrDwfbzHfbn6Xt/WQZmt3u569F0x+eBoY/NN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kx5vb1hjzxPKrlk4d8bUFrXQVoHiiO09sM7/3WjLiBuAIAqxJx0IeHM/beNuoB8ByA3LMBd
I3LVKLl0T9hVGD09iOoIs07orwK6gAIT8KkCSxKQub8M6AICJgA6FuDZE/LoSfIQlv9ckTIbO0CI6giz/TBZ+EuBMqLABnyyghaNyDCSur8YKCMCRgB6FyPo
XQy7IKNupwqhJDjxyPc86pi4agHCwEqCJe9/TqSOyVcu8sYL87Ubwx96mVbQx/Df64NtT9VHyXVj/8GkDyqwBJ+yoGNjeoxm77+u1QcFTAH0NcC7wcirwZKX
5A27VAvOFKpASq8b+++ZbwErMAafNrx2Yfn7/zK6BSxgDqDXAb4hWQraIuTbKPzAoNKinLnxyEvet8AV3MUDxOHFCVqA8feUN8FFiPuUHP+DgkHGdGtpxsOt
pRm78cgX6bfAFUgOII5uLd3K2IJiCxj5jusWuBLJ8T/nip4Wq+jW8phSwBFICiDmLrK1dAGZkBgFHIFkUv75HsuYbR7BPPiWf2FhNIFBQRg7TgXznFd2Wdjf
9cvP0k7+aba7x8nrX4f61TaTPyaVbV/r5nE2qZv2Vz09/Whs+9JUk/sfttr/D1oqwNaYRgAA
But you'll need a lot of segments for the problem to manifest.
Loewchen
Global Moderator
Global Moderator
Posts: 10313
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [14.21] Very slow unloading with large circuit network

Post by Loewchen »

Post the log-file after an instance with the issue please (see my signature on where to find it).
Rseding91
Factorio Staff
Factorio Staff
Posts: 16000
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [14.21] Very slow unloading with large circuit network

Post by Rseding91 »

This is already fixed for 0.15 :)
If you want to get ahold of me I'm almost always on Discord.
golfmiketango
Filter Inserter
Filter Inserter
Posts: 549
Joined: Fri Jan 29, 2016 2:48 am
Contact:

Re: [14.21] Very slow unloading with large circuit network

Post by golfmiketango »

Vegemeister wrote: System: Fedora Linux, x86-64

<snip!>

I ran the "perf top" command ...
OT, but, I did not know about this tool, it looks amazing! Thanks for mentioning it.
Post Reply

Return to “Resolved Problems and Bugs”