Tracking down hitch warnings, got a question

Hello gents(and lady?)!

Before it’s mentioned, I love the Speeding up your server (Windows) topic. If you’re running on linux, however, it becomes decidedly less useful. Other than the layman description at the top and the SQL index comment at the bottom, there’s not a whole of meat on that bone.

So, I’ve got a question about this. How does the game determine hitch warnings? Are these detected in Citizen.CreateThread loops both in client and server or is it just the server loops, keeping in mind that they can be slowed down by a delayed response from a client event? The reason I ask is I need to track down the worst offenders in an attempt to tidy it up a bit.

I’ve thought about timing from top to bottom of a loop and then printing to server terminal if it’s over a threshold but I think I’m missing something important. Since loops can end early, I can’t really count on it to make it to the end of the loop.

I want to figure out the nuts and bolts of it before I start tackling a hundred or so resources so I don’t end up chasing my tail.

Thanks for your time!