nihilistzsche / LtnManager

A GUI for managing your Logistic Train Network. A mod for Factorio.
https://mods.factorio.com/mod/LtnManager
MIT License
49 stars 13 forks source link

Performance impact on GUI update time even with the window closed #228

Open Gammro opened 1 year ago

Gammro commented 1 year ago

Describe the Bug

I found that in my game the GUI update was suddenly pretty high. By accident I found that this was caused by which tab of LTN manager is opened.

I have a lot of stations, so when all those are listed the time gets pretty high, and I expect that. However, the time used remains high when the LTN manager window is closed.

I'm not sure if this is something that can be fixed on the mod level or if it's a factorio modding API limitation. As a workaround. I now know to always go back to a less intensive tab if I want to keep my performance.

To Reproduce

Be certain to reproduce the issue on the same save file that you upload.

Screenshot of my own observations

These observations were made in an SE+K2 save with 951 stations, and 166 trains spread over 8 surfaces. image

Gammro commented 1 year ago

I've nosed around in the source, and I see closing the window sets visible to false. This might be the cause of the continuing processing load.

Some mods I've seen use the destroy() and build() methods, and I think using this this might improve performance while the window is closed. I understand a change like that encompasses a significant refactor.

eugene002 commented 6 months ago

little workaround: Open LTN manager window, Go to stations tab and filter only one station. Performance will be better.