Need assistance reading the micro profiler

Hey everyone, recently I opened my game for testing and I’ve noticed that from time to time I get lag spikes.


https://gyazo.com/0d44f78b0d59e894de373f30bbf0b7d7

Unfortunately, I’m not very experienced with reading the micro profiler so I’m not exactly sure what the cause of the problem is.

I’ve done some research but was unable to find out what each bar means.

They are assigned to each object in the game, or the class that is inherited form. Your script is a class that is taking up memory in your Profile, It appears that your Worker: RunJob is hogging a lot of memory.
I would take a look at this video https://www.youtube.com/watch?v=l9fnVhyyUQM
I would reccomend learning the API for lua microprofiler on lua documentation.

Could you possibly provide a link for the Lua documentation for microprofiler? I can’t seem to find anything on that topic. As for the video, I’ve watched it before but it mostly covers physics and rendering. I believe a script may be causing an issue.

I cant find anything on that topic so i cant link you, However i do have C++ knowledge and I can tell you 100% that it is using a C++ function call or method , Worker :: RunJob Im assuming that the Client is the “Worker” and the Job is whatever stream of data your sending to client from the server at that point.

So the issue is related to client and server communication using remotes or remote functions?

I assume so, because logically it would make sense.

I see, so would this issue be the fact that I have many remote requests OR the amount of data being sent in one remote? I do try to optimize my remotes by checking how often it’s being sent and if no further requests are coming in I fire the remote. As for information, there is a fair bit of information (Large tables)

Yeah that seems to be the problem, I would suggest only getting a request when needed and not sending data back and fourth, only pull data out of the table that is needed and don’t call the full table.

I see, that seems like a great way to further optimize, thank you for helping me out. Is there anyway I could learn more about the usage of microprofiler? I do wish to be able to find solutions to my issue without relying on the dev forum community every time.

Learn C++ basics, i have a youtube where I teach it. It helped me instantly understand what it was talking about because of pointers and reference types. If you would like I can link you? Also teach Python, C#, Java, CSS, HTLM, JS, and Lua. So it would help quite a bit.

Alright, please do link it, I’ll check it out when I got the time. Is C++ hard to learn or how similar is it to Lua? I haven’t done any other programming outside of Roblox Lua and Just general Lua.

C++ and C# are pretty similar to lua in my opinion, They have differences as they can both be used in real world application but they help immensely whilst learning lua.