Is there a way to debug CPU usage with microprofiler?

I’m trying to see what causes big freezes on CPU after being a while in a game. I’ve discovered microprofiler and decided to use it, but it seems like it shows usage of GPU, not CPU. Most likely one of my game scripts creates a lot of “something” and doesn’t remove it, so I’m looking for a way to see which script and which function does it. If you guys have experience with debugging CPU usage, please let me know! Thanks!

In Studio: View > Script Performance. Rate is how often your code is executed. Activity is how much your code actually impacts the game. Generally, below 3% activity is good, but it depends on the type of the script. 0.5% is bad for a simple UI script, but not bad for a custom camera system that runs every frame. However, what you’re describing (creating something and “leaving” it), sounds more like a memory problem.

1 Like

Ah thanks, I already fixed it anyway. Seems like I left a bunch of threads with an endless loop and unnecessary checks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.