Rail Signal Planner


[QoL] Automatically place rail signals on rails and intersections.

Utilities
1 year, 2 months ago
0.17 - 1.1
20.2K
Logistics Trains

g Absurdly long time to calculate signal placement

10 months ago
(updated 10 months ago)

Hello, I am currently experiencing long wait times for the mod to calculate the placement of signals, which just freezes my screen for long periods of time, even on very short sections of rails(~30). I do not use place when building. The freezes are so long, that it would be better if most of the time I just didn't use the mod and placed them manually. I only use this for placing signals on blocks of rails where there are no intersections, just lengths of straight and/or curved rails to make blocks that can fit my trains. These blocks are connected to my entire rail network, of course, which supports (118)1-2 trains and 43(2-8) trains. Obviously, there are tons of signals on the rail network, with a few intricate intersections, so that it may handle the trains efficiently. Which leads me to believe that even though I only select a small block where I want signals, the mod looks at the ENTIRE rail network every single time, outside of the block I selected, which could possibly lead to long load times. I don't know if this is the case, but when I first started out using this mod, long before my base was anywhere near this size, I did not have this problem. I looked for any possible settings I could change to help improve my situation but all I could find were settings to adjust signal spacing or to enable/disable the settings button. And yes, I did notice the screen freezing time increasing as my base grew and I stupidly thought that maybe it would just go away(topkek) but now it's just about unbearable, the only thing saving me from not using it is that I can just minimize and occupy myself with other things while the mod does its business. I have not added any new mods since it was working fine. Any help would be appreciated.

Edit: I started to develop a separate rail network in the same game and I still get the long freezes, even on the minuscule amount of rails on that rail network. Maybe it could be computer performance issues, although I still do have 60 fps and 60 ups in game when this occurs.

10 months ago
(updated 10 months ago)

Thanks for the report. This shouldn't happen indeed, do you have any way to share the save file with me so I can test?
Or some screenshots or blueprint with the rails that it should consider + a bit outside (2-3 train lengths). Also share the RSP settings in that case.

You can also enable some debug mode I used when developing. You'd have to manually adjust one line of code.
In control.lua change the line build_graph(rails, player) to build_graph(rails, player, true).
build_graph has a debug as third argument that will draw a circle in game on all rail signal positions it is taking into the calculations. This should not extend past certain signals.
If it does, please take a screenshot of that.

Edit: I started to develop a separate rail network in the same game and I still get the long freezes, even on the minuscule amount of rails on that rail network. Maybe it could be computer performance issues, although I still do have 60 fps and 60 ups in game when this occurs.

Right, so even if you just select one stand alone rail that contains one signal? If so that'd be weird, as I tried to make sure to keep everything local..
I will admit I have not tested the newest version on large save files.

New response