[Rseding91] [15.21] Placing rail with no-pathing trains causes lag

Bugs that are actually features.
AlienX
Fast Inserter
Fast Inserter
Posts: 105
Joined: Wed May 17, 2017 7:13 pm
Contact:

[Rseding91] [15.21] Placing rail with no-pathing trains causes lag

Post by AlienX »

On our map, we currently have made a temporary stacker as we remove the current rail network and add it again differently.
All of our trains were sent to the stacker (about 50 trains), and the outbound lane was removed to ensure they stay there, they are no-pathing though.

Adding rail anywhere causes a massive FPS drop (goes to about 5-6 FPS when placing over 50 rail at once) but only when the trains are currently trying to path.

Just wondering if it's related to the other bug that Factorio had a vew versions ago with trains and lag due to them repathing every time a new rail segment was put down.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14976
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [15.21] Placing rail with no-pathing trains causes lag

Post by Rseding91 »

Can you please post the save file?

There's a good chance that it's working correctly although the performance hit isn't really desired. We don't currently have a good way to know if building a rail now makes a valid path for trains that are in the no-path state so all trains in that state are told to re-path.
If you want to get ahold of me I'm almost always on Discord.
AlienX
Fast Inserter
Fast Inserter
Posts: 105
Joined: Wed May 17, 2017 7:13 pm
Contact:

Re: [Rseding91] [15.21] Placing rail with no-pathing trains causes lag

Post by AlienX »

Sure, you can download it here:
https://www.vps-solutions.co.uk/private/_autosave20.zip

If you're able to login as my character (called AlienX) there is a BPBook in my hotbar with 8 lane rail segments, place one of these down anywhere on the map and my robots will do the rest of the work and show the issue.

Ps.
I have very weird friends who like to put weird map markers on the save, so you can just ignore them lol
Rseding91
Factorio Staff
Factorio Staff
Posts: 14976
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [15.21] Placing rail with no-pathing trains causes lag

Post by Rseding91 »

I looked at it and wasn't able to see anything broken logic wise. The game simply doesn't know when a rail built causes a path to now become valid so it tells each train in the no-path state to re-check every time one is built.

I've got some thoughts on ways to improve it but as it is, it's working correctly (although with the amount of trains you have - slowly).
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Not a bug”