Skip to content

In RemoveCellsFromPlayerShroud, don't call RemoveSource unless required.#21612

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
RoosterDragon:shroud-perf
Oct 7, 2024
Merged

In RemoveCellsFromPlayerShroud, don't call RemoveSource unless required.#21612
PunkPun merged 1 commit into
OpenRA:bleedfrom
RoosterDragon:shroud-perf

Conversation

@RoosterDragon

Copy link
Copy Markdown
Member

Since AddCellsToPlayerShroud only adds for players with a valid relationship, we can skip a dictionary lookup in RemoveSource by only attempting the remove if the relationship check passes as well.

Closes #21595

Since AddCellsToPlayerShroud only adds for players with a valid relationship, we can skip a dictionary lookup in RemoveSource by only attempting the remove if the relationship check passes as well.

@anvilvapre anvilvapre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untested.

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't spot any regressions

@PunkPun
PunkPun merged commit 86b9227 into OpenRA:bleed Oct 7, 2024
@PunkPun

PunkPun commented Oct 7, 2024

Copy link
Copy Markdown
Member

changelog

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AffectsShroud.UpdateShroudCells contineously calls Shroud.RemoveSource

3 participants