- Home /
Profiling a gradual Editor slowdown?
I'm experiencing a gradual Editor slowdown. After a few Plays and some time spent in the game (inside the Editor), the game runs considerably slower and finally gets to the choppy 10 FPS. Real FPS - measured with a separate script - fall down and as the game gets slower, the FPS estimate given by the Stats window gradually gets higher. The Profiler doesn't show any performance issues.
Restarting the Unity Editor helps. Game runs super-smooth after an Editor restart, then after a time it slows down. Restarting the game in Editor doesn't change a thing - it's still slow after a restart. Only restarting the whole Editor does help.
I didn't manage to test if I happens in the build, but all the traces lead to some kind of Editor performance leak. It most surely isn't a memory issue - I experienced the slowdown when Windows Task Manager displayed very low memory use.
How should I approach debugging and profiling an Editor performance issue?
Try first your game as a standalon windows game to see the performance
Yep, that's the plan. But the problem exist regardless - testing game in Editor gets PAINFULLY SLOW after a short while of usage.
@pioiwan If you build it and play the build, does it play ok?
We have a lots of custom shaders right now and they don't compile - so I can not make a build right now. But as I said - I see it as more of an Editor issue.
Yes ok, but the problem is on Play. And it seems like memory problem. The garbage collector is a bit weird. what is the memory in the editor stats?
Answer by Baste · Sep 25, 2014 at 03:47 PM
Are you doing any editor scripting at all? If that's the case, you might have a memory leak in one of those scripts - say a custom view that keeps adding elements to a list or something along those lines.
Anyways, to profile the editor, open the Profiler window (Window/Profiler), and select "Profile Editor". That's only available on pro, so if you're on free, no such luck.
//Copy of a comment from discussion under the Question. $$anonymous$$ay shed some light of the whole problem I had.
Wow, I didn't know about Profile Editor option, I totally missed it. Yes, we're using a fair amount of editor scripts.
BUT: today I have spent a whole day browsing through repository history and checking when did the problem start. I tracked it down to a S$$anonymous$$AA anti-aliasing script, that caused all the problems. It's basicly a camera post-effect with a custom shader.
As I now track the issue with Editor Profiler the whole overheard appears in DockArea.OnGUI(). Details in the screenshot: http://imgur.com/r1ukr15.
I don't know if I would track the faulting script using editor profiling, but it would give some additional info.
I don't fully understand it, but got it working. Thanks guys :)!
EDIT: LOL, LOL, LOL. Actually the whole performance hog was in DISPLAING THE STATS WINDOW. Turn off the window - it works fine.
Your answer
![](https://koobas.hobune.stream/wayback/20220613163735im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Seeing total allocated memory per-function in the profiler? 0 Answers
Setting Active Profiler to WindowsPlayer does nothing 0 Answers
Unaccounted time between: WaitForTargetFPS and GPUProfiler.EndQueries 0 Answers
How to reset profiler data? 0 Answers
EventSystem.Update() takes up 90% of CPU - Profiler Data Help 0 Answers