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

RoosterDragon
Copy link
Member

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
Copy link
Contributor

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.

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.
@abcdefg30 abcdefg30 merged commit b460933 into OpenRA:bleed Mar 18, 2018
@RoosterDragon RoosterDragon deleted the shroud-reuse-set branch March 18, 2018 15:50
@abcdefg30
Copy link
Member

Changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants