Page 1 of 1

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

Posted: Sat Jun 17, 2017 9:53 pm
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.

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

Posted: Sun Jun 18, 2017 12:48 am
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.

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

Posted: Sun Jun 18, 2017 12:25 pm
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

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

Posted: Sun Jun 18, 2017 8:50 pm
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).