Skip to content

Cache teams in observer logic#21477

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
RoosterDragon:observer-logic-perf
Jul 16, 2024
Merged

Cache teams in observer logic#21477
PunkPun merged 1 commit into
OpenRA:bleedfrom
RoosterDragon:observer-logic-perf

Conversation

@RoosterDragon

Copy link
Copy Markdown
Member

The player state and teams are fixed after the game starts, so it is safe to cache the resulting teams in the observer logic rather than re-evaluating them each time.


Closes #21283 - on looking into it all the data is safe to cache, so why not.

@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.

Comment thread OpenRA.Mods.Common/Widgets/Logic/Ingame/ObserverShroudSelectorLogic.cs Outdated
The player state and teams are fixed after the game starts, so it is safe to cache the resulting teams in the observer logic rather than re-evaluating them each time.
@RoosterDragon RoosterDragon force-pushed the observer-logic-perf branch from 75d218d to f14eee8 Compare July 9, 2024 16:37
@PunkPun PunkPun merged commit a5dd4ff into OpenRA:bleed Jul 16, 2024
@PunkPun

PunkPun commented Jul 16, 2024

Copy link
Copy Markdown
Member

changelog

@RoosterDragon RoosterDragon deleted the observer-logic-perf branch July 18, 2024 17:28
MustaphaTR added a commit to MustaphaTR/OpenRA that referenced this pull request Jul 21, 2024
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.

Do not use IOrderEnumerable as fields.

3 participants