-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppression code can be fairly hot, e.g. when an explosion occurs within a large group of pawns that sends them looking for cover. Some of the relevant logic in SuppressionUtility is using LINQ heavily, which causes significant memory pressure in such scenarios. When profiling a save with a doomsday hitting a 10k point tribal raid, InterceptorZonesFor() was responsible for ~3.7% of total time despite there being no shields on the map at all. So, replace LINQ in relevant methods with iterator functions, which are less memory intensive, eliminating about ~3.5% of the total time.
- Loading branch information
1 parent
5c87933
commit 2cbe724
Showing
3 changed files
with
112 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters