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

fix(bridge): statebag spam #157

Merged
merged 2 commits into from
Dec 1, 2024
Merged

fix(bridge): statebag spam #157

merged 2 commits into from
Dec 1, 2024

Conversation

Manason
Copy link
Member

@Manason Manason commented Dec 1, 2024

In qbx_vehiclekeys, we assign keys to a specific vehicle entity rather than a plate. When using native qbx_vehiclekeys exports, the caller passes the entity to assign keys to. However, if using the bridge, we look up all vehicles with the given plate, which normally matches to like 30 vehicles, so it causes heavy performance usage setting statebag on all of those.

This PR fixes the issue by adding a 20ms delay between state bag sets to avoid overload.

@Manason Manason changed the title fix(bridge): statebag spam WIP: fix(bridge): statebag spam Dec 1, 2024
@Manason Manason changed the title WIP: fix(bridge): statebag spam fix(bridge): statebag spam Dec 1, 2024
@Manason Manason merged commit 38a7883 into main Dec 1, 2024
3 of 4 checks passed
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