CombatExtended-Continued / CombatExtended

Combat Extended mod for RimWorld
356 stars 244 forks source link

Loadout manager window performance fixes #3160

Closed ProTriforcer closed 1 month ago

ProTriforcer commented 1 month ago

Changes

Reasoning

The previous implementation searches through every selectable thing on the map for every item in the list. That's a lot, especially for big and mountanous maps. Now it's only done once each time you open the window or the generic tab. The rest of the lookups go through a distinct list of defs found, which is much, much smaller. That frees up a lot of performance to reimplement the visibility check that was deemed "CPU expensive!" before.

Testing

Check tests you have performed:

github-actions[bot] commented 1 month ago

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-9296090090.zip