- Home /
Why does running the Profiler increase framerate?
Hello all,
I have a strange scenario in which running the unity profiler increases the fps of the game considerably.
When I'm not running the profiler, the stats panel shows: 25fps Main Thread ~40ms Renderer: ~20ms
All I do is open the profiler window, and suddenly this changes to: 60fps (VSync) Main thread ~9ms Renderer ~10ms
The game is also much more responsive.
Has anyone seen this sort of behaviour before, or have any idea why the profiler might have this effect? Obviously the profiler isn't much use in these circumstances...
I am curious if you ever found out anything on this issue.
I am seeing something similar on my Android device. With the same exact build running WITHOUT profiler hooked up through my device I am seeing CPU of around 60% and some slight stuttering at times (using targetframerate = 30). Now turn on profiling and the CPU drops to 30% and game plays smooth as glass, basically the game runs like it would without targetframerate at all but the CPU in that case jumps to 70-80% without profiling.
Very, very strange and so far no luck at figuring out what could be the cause. I am now attempting to check the FPS rate through the game so I can see what it hits in both scenarios (profiling and non profiling) to see if somehow maybe running the game in profiler is slowing the FPS but smoothing it out or something. However it sure does not appear to be the case, I would swear that running it via the profiler is increasing the FPS.
Does it maybe have to do with DEBUG prints and where they get sent in the two cases?
DEBUGs can be a surprising drain on the system...
Nope. $$anonymous$$ade sure to yank any of the debug statements out. Plus it would be weird that the debug statements would be more efficient with profiling then not.
Are you attaching the profiler to a standalone build or are you running the game in the editor?
I have seen performance hits on standalone builds if you make it a development build and you select "Auto-connect profiler". $$anonymous$$ake sure you don't select that.
Edit: I forgot to mention that the performance hit occurs with that option selected EVEN if the profiler is not connected.
Was this ever figured out? I seem to be having the same problem with my gearvr app. It lags terribly with a standalone build or a dev build without the profiler on and when its on and connected the app runs perfectly smooth.
Your answer
Follow this Question
Related Questions
Unity 2019.3 LWRP strange Performance Issue on android 0 Answers
Performance load of OnGUI 0 Answers
Low FPS with no shown reason 2 Answers
I dont know what EditorLoop is in my profiler?,I don't know what EditorLoop is in my profiler? 3 Answers
BehaviourUpdate taking unreasonable amounts of resources in the profiler 1 Answer