Skip to content
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

Performance patch for MainSpoonerUpdates thread call #51

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

daggre
Copy link

@daggre daggre commented Jan 18, 2024

  • Modify GetModelName so that it uses hash lookup tables instead of iterating through Objects/Vehicles/Peds/Pickups and hashing each name until there is a match every frame.
    • When aiming at no entity, main loop thread improved from ~1033ms to ~11ms

Before:
spooner_before
After:
spooner_after

  • Add a rate limit for the 'updateSpoonerHud' SendNUIMessage. Without a rate limit, the increased frame rate overloads the NUI and it struggles to keep up with the messages.

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.

1 participant