Skip to content

implement caching of unit configs by type#109

Merged
DivineThreepwood merged 1 commit intodevfrom
95-cache-unitconfigs-by-type
Apr 4, 2023
Merged

implement caching of unit configs by type#109
DivineThreepwood merged 1 commit intodevfrom
95-cache-unitconfigs-by-type

Conversation

@pLeminoq
Copy link
Contributor

@pLeminoq pLeminoq commented Mar 7, 2023

📜 Description

Changes proposed in this pull request:

  • The unit registry caches unit configs by type. This drastically reduces CPU usage since the method getUnitConfigsByUnitType is called often and before this PR it always iterated over all units. For me, this dropped CPU usage to about 1% when running simulation mode.

@pLeminoq pLeminoq linked an issue Mar 7, 2023 that may be closed by this pull request
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.

Cache UnitConfigs by Type

2 participants