thelindat / linden_outlawalert

Display notifications for any job, with automated checks for shooting, carjacking, speeding, and more.
https://forum.cfx.re/t/esx-outlawalert-wildfire-alerts-and-hypaste-mdt-integration/2067483
MIT License
42 stars 60 forks source link

Constant high hitching #6

Closed SteveBaggins closed 3 years ago

SteveBaggins commented 3 years ago

Love the script, but it is causing 1k hitches every single alert. Screenshot below shows a profiler view of it going on and the lines. I have not edited the server lua at all.

alerts

thelindat commented 3 years ago

Fine on my end, but I don't know what it's like under heavy load. How many people are on, how frequently are alerts going out?

SteveBaggins commented 3 years ago

Fine on my end, but I don't know what it's like under heavy load. How many people are on, how frequently are alerts going out?

Uh, 55-64 players all the time. PRetty often we have alerts going out. Just upgraded our server box, and still hitching at 50+ players.

thelindat commented 3 years ago

Uh, 55-64 players all the time. PRetty often we have alerts going out.

Might not like parsing the online players and their job every time an alert goes out; if you're using esx_service I believe you could reference a table of specifically on-duty cops instead of checking each player one-by-one.

EDIT: See if the dev branch performs better for you. https://github.com/thelindat/linden_outlawalert/tree/dev