Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse a HashSet for deduplicating footprints in AffectsShroud. #14932

Merged
merged 1 commit into from Mar 18, 2018

Conversation

Projects
None yet
3 participants
@RoosterDragon
Copy link
Member

RoosterDragon commented Mar 17, 2018

Shroud footprints are recalulated as actors move around the map, and thus this gets called quite often. This allows us to avoid allocating a new set and the CPU hit required to set it up each time.

@reaperrr

This comment has been minimized.

Copy link
Contributor

reaperrr commented Mar 17, 2018

OpenRA.Mods.Common/Traits/AffectsShroud.cs:L37: [SA1215] All non-static readonly private fields must be placed before all non-static non-readonly private fields.

Reuse a HashSet for deduplicating footprints in AffectsShroud.
Shroud footprints are recalculated as actors move around the map, and thus this gets called quite often. This allows us to avoid allocating a new set and the CPU hit required to set it up each time.

@RoosterDragon RoosterDragon force-pushed the RoosterDragon:shroud-reuse-set branch from a4e0fc3 to c4bf559 Mar 17, 2018

@abcdefg30 abcdefg30 merged commit b460933 into OpenRA:bleed Mar 18, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@RoosterDragon RoosterDragon deleted the RoosterDragon:shroud-reuse-set branch Mar 18, 2018

@abcdefg30

This comment has been minimized.

Copy link
Member

abcdefg30 commented Mar 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.