[1.1.59] Train pathfinder is slow

This subforum contains all the issues which we already resolved.
Post Reply
ctnightmare
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Mar 02, 2019 12:21 pm
Contact:

[1.1.59] Train pathfinder is slow

Post by ctnightmare »

Starting with version 1.1.59 the train path finder in my Py modded game has gone from taking less than 1 to taking over 1000's to complete. This save has about 2100 station with 300 trains.
I have loaded up an older save to version 1.1.57 and the train path finder wasn't an issue and I have updated the save to version 1.1.59 and the train path finder keeps hitting upwards of 40 - 60. This save has 1800 station with 1200 train.
Pics

Loewchen
Global Moderator
Global Moderator
Posts: 8319
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [1.1.59] Train Path Finder time

Post by Loewchen »

Post your log and a link to your save file please.

ctnightmare
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Mar 02, 2019 12:21 pm
Contact:

Re: [1.1.59] Train pathfinder is slow

Post by ctnightmare »

Attachments
factorio-current.log
(90.93 KiB) Downloaded 86 times

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.59] Train pathfinder is slow

Post by boskid »

And what are you expecting me to do? Make it fast? I was looking into the reasons why the trains pathfinder is slow, the most common reason is having trains in a NO_PATH state but i see that rails missing near [gps=2247,1614] are only causing NO_PATH state for 2 trains which are really close to the missing rails which means its a really fast failure of trains pathfinder. I also noticed trains pathfinder taking super long time (>10000 steps) when finding path to a train stop at [gps=1551,173] for a train near [gps=1661,81] due to a congestion which means the path penalty here is quite high and this causes trains pathfinder to visit a lot more segments than usually needed because it really tries to find a path that does not contain the train without locomotive at [gps=1552,183].

There were no trains pathfinder changes recently so the only reason here is most likely this one cargo wagon without locomotive caused by most likely some mod removal or mod changes.

ctnightmare
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Mar 02, 2019 12:21 pm
Contact:

Re: [1.1.59] Train pathfinder is slow

Post by ctnightmare »

Thanks, I'll dig into it and close this ticket.

ctnightmare
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sat Mar 02, 2019 12:21 pm
Contact:

Re: [1.1.59] Train pathfinder is slow

Post by ctnightmare »

Fixing the train stop at [gps=1551,173] did the trick. If I can ask how you were able to track this down or point me to material so I can learn I would love to learn how

A million thanks

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.59] Train pathfinder is slow

Post by boskid »

ctnightmare wrote:
Wed May 11, 2022 12:19 am
If I can ask how you were able to track this down or point me to material so I can learn I would love to learn how
I was running factorio under debugger, not something that you could do so there are no options for you to find the issue yourself in 1.1.59. Since those data were annoying to obtain even for me, i also implemented a debug setting "show-train-no-path-details" that will be available starting from version 1.1.60 when it will be released. This debug setting will be printing a lot of extra details of the trains pathfinder showing how many steps trains pathfinder took, what was the penalty of the path, which train was requesting the path and where it is trying to go. This will include all the trains pathfinder requests that ended in the NO_PATH state, but it will also report slow trains pathfinder searches (those which took >= 10000 steps by default, configurable through a threshold inside of "the rest" hidden settings).

DarkShadow44
Filter Inserter
Filter Inserter
Posts: 275
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: [1.1.59] Train pathfinder is slow

Post by DarkShadow44 »

Could a mod please move this to fixed / not a bug?

Post Reply

Return to “Resolved Problems and Bugs”