Mod version: 2.1.1
Factorio version: 2.0
Multiplayer: Yes
Description:
The mod causes a notable performance impact even when no armor plates have been crafted or placed anywhere in the game. In the debug screen (F5), mod-armor-plating-redux shows values of 1.670/0.000/155.762 ms, with the spike value of ~155ms being particularly concerning.
This happens with:
- Zero armor plates in the game
- No plates equipped on any vehicle or character
- Only the mod installed and active
Expected behavior:
With no plates in the game, the mod should have near-zero performance cost.
Suspected cause:
The mod appears to be scanning all vehicles with equipment grids every tick (or very frequently), even when there are no plates to check. We have a large number of vehicles from other mods (AAI Vehicles, Mining Drones, WH40k Titans, etc.), which likely causes the scan to iterate over hundreds of entities unnecessarily.
In multiplayer this is amplified further, as the overhead affects all connected players.
Suggestion:
Consider skipping the scan entirely when no armor plates exist in the game, or use an event-driven approach (e.g. only run logic on on_equipment_inserted / on_entity_damaged) rather than a per-tick scan.