Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tweak(mumble): reduce locking around GetTalkers #3729

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

Open
AvarianKnight wants to merge 1 commit into citizenfx:master
base: master
Choose a base branch
Loading
from AvarianKnight:tweak/mumble-reduce-locking

Conversation

@AvarianKnight
Copy link
Contributor

@AvarianKnight AvarianKnight commented Nov 29, 2025

Goal of this PR

Reduce locking around user list access

How is this PR achieving the goal

  • _isAnyoneTalking gets called a decent bit in game code, and for some reason the code here iterates the entire talker list again, and this can presumably happen multiple times a frame and cause lock contention. Most of the work here is already handled by another call that happens per frame so we just reuse g_talkers and o_talkers.

  • GetTalkers also did a bunch of un-needed locking on every GetUser call when it was trying to get users from their session id's, so we change how we expect data to be handed back down and add a new function to handle getting all of the user names and reduce the amount of locking/unlocking we do.

This PR applies to the following area(s)

FiveM/RedM

Successfully tested on

Game builds: ..

Platforms: Windows, Linux

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

Yum1x, S4CKY585, spacevx, and GasmanDev reacted with thumbs up emoji
- `_isAnyoneTalking` gets called a decent bit in game code, and for some
reason the code here iterates *the entire talker list* again, and this can
presummably happen multiple times a frame and cause lock contention. Most
of the work here is already handled by another call that happens per frame
so we juse reuse `g_talkers` and `o_talkers`.
- `GetTalkers` also did a bunch of un-needed locking on every `GetUser`
call when it was trying to get users from their session id's, so we change
how we expect data to be handed back down and add a new function to handle
getting all of the user names and reduce the amount of locking/unlocking
we do.
@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

invalid Requires changes before it's considered valid and can be (re)triaged

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /