Skip to content

Do entity start metric update and expiration fiber start asynchronously to reduce contention - #185

Merged
ghostdogpr merged 1 commit into
series/2.xfrom
reduce-contention
May 26, 2026
Merged

Do entity start metric update and expiration fiber start asynchronously to reduce contention#185
ghostdogpr merged 1 commit into
series/2.xfrom
reduce-contention

Conversation

@ghostdogpr

Copy link
Copy Markdown
Collaborator

EntityManager uses Ref.Synchronized which uses a semaphore under the hood to prevent concurrent addition/removal of entities. To reduce contention there, I moved the gauge metric update and the expiration fiber creation inside forkDaemon since there is no reason to wait for it.

@ghostdogpr ghostdogpr self-assigned this May 26, 2026
@ghostdogpr
ghostdogpr merged commit c8d066b into series/2.x May 26, 2026
5 checks passed
@ghostdogpr
ghostdogpr deleted the reduce-contention branch May 26, 2026 01:44
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.

3 participants