Hello,
I've been playing a 1000x tech cost challenge with biters enabled and using land mines to clear nests. Over time, I've noticed a degradation in performance and I eventually traced the issue back to leftover landmines and worms. I presume they are stuck in a constant "combat state", while I expected them to enter a "sleep state", as worms cannot trigger or (intentionally) attack the mines. This happened every time I cleared a nest and left some worms, and each nest clearing accumulated.
I've managed to create a minimal save to demonstrate the issue, which already causes UPS to drop below 60 on my computer:
I fully understand that I might be the only person that is affected by this and it's simple to work around, but I figured I might as well report it after finding out what was causing it.
[1.1.109] Landmines in range of worms drain UPS
[1.1.109] Landmines in range of worms drain UPS
- Attachments
-
- factorio-current.log
- (8.17 KiB) Downloaded 14 times
-
- 1000xrail2_aa.zip
- Main save
- (64.77 MiB) Downloaded 20 times
-
- landmine_ups_demo.zip
- Minimal save
- (2.68 MiB) Downloaded 23 times
Re: [1.1.109] Landmines in range of worms drain UPS
Sorry, searched "mine", "mines", "landmine" but not "landmines".
Still, I also provide an organic save where this caused UPS drops. I was about to write it off as "just biters being slow" if show-time-usage and show-entity-time-usage didn't report completely different times (15ms / 3ms). If no optimizations can be done, then adding landmines to show-entity-time-usage (or somewhere adjacent) would at least be helpful in diagnosing instances of this issue.
Still, I also provide an organic save where this caused UPS drops. I was about to write it off as "just biters being slow" if show-time-usage and show-entity-time-usage didn't report completely different times (15ms / 3ms). If no optimizations can be done, then adding landmines to show-entity-time-usage (or somewhere adjacent) would at least be helpful in diagnosing instances of this issue.
Re: [1.1.109] Landmines in range of worms drain UPS
Exposing time taken by landmines is not feasible because they are using WhenEnemyIsAround mode which makes them register on a chunk. Entities that are using other active modes are registering on a surface and here its cheap to have 80+ lists (one per entity type) and measure update time of an entire list. In case of landmines since they are registering per chunk, any measurements would have to be made explicitly each update by the land mine code itself which means additional overhead just for time statistics. Logic of landmines is just expensive so unless other dev has a clever solution for this, there is not much to be done. Some changes were applied to the WhenEnemyIsAround logic for 2.0 (as mentioned in the post linked in my previous post).
Put it simply: "debug settings are nice, but performance is nicer". I am not willing to make landmines even slower just so they report accurate time statistics.
Put it simply: "debug settings are nice, but performance is nicer". I am not willing to make landmines even slower just so they report accurate time statistics.
Re: [1.1.109] Landmines in range of worms drain UPS
Moving to minor issues. Nothing here is broken, but poor performance is not the goal. If we ever find a nice solution we'll address it then, but I don't see it happening.
If you want to get ahold of me I'm almost always on Discord.