State of Anarchy MicroProfiler Analysis

A common complaint in State of Anarchy is a sudden spike in ping when a player joins. I’m almost positive it’s due to the server loading the character and how expensive humanoids are, plus the character’s physics, and a lot of data being sent through Remotes, etc., etc.

Anyways, I captured 4 seconds of the MicroProfiler before someone joins and when someone joins to see if there’s anything I can get from there. The documentation is still lackluster, so I’m coming here to see if anyone else understands it better than I do.

I’m hoping the issue can be pinpointed so we can focus on optimizing that specifically before going to anything else that may not be a problem.

4 seconds before someone joins: log_F1E82_microprofile_20200905-144452.html (217.5 KB)

4 seconds as someone joins: log_F1E82_microprofile_20200905-144523.html (222.6 KB)

(open these in your browser of choice, it’s an interactive MicroProfiler within the browser, similar to the one in game.)

Do you happen to use a lot of loops in your game?

A common theme among the profiles where lag is reported is that runJob is spanning several columns, meaning that some processes in your game are relatively expensive. Players joining games typically does not cause spikes, so developer code may be a huge culprit here.

What kinds of protocols do you run when a player joins? Specifically in the realm of loops, RunService interaction and anything to do with the network (remotes and HttpService).