- Home /
Profiler causes lag with standalone build on unity 2017.1
Hello.
I have been facing a problem with the unity profiler since updating unity to 2017.1.0 version. When I create a standalone-windows development build and connect it to the profiler, then hit record on the profiler, and start to play the game in the build, I get occasional lag spikes in the game along with glitches and stuttering of the audio, those lag spikes are only present when the profiler is recording, which makes it hard to diagnose performance issues with the standalone-build because I can't pinpoint normal lag spikes and performance problems( those which are not caused by the profiler), from the spikes caused by the profiler. And when I check the lag spikes in the profiler, they are mostly in the form of GFX.WaitForPresent.
Also, I can't use the profiler with the play mode in the editor because, as you all probably know, it causes a lot of overhead in the editor. Has anyone faced a similar problem? maybe it's not really related to 2017.1 version but I haven't noticed it till now?
I have searched on the unity Q&A and forums but haven't found a similar problem yet.
Thanks
Answer by TheSOULDev · Sep 25, 2017 at 03:24 PM
Gfx.WaitForPresent is VSync. Ignore it. The profiler isn't lagging and debugging it in the Editor won't cause your game to lag, either (just the editor). The spikes from Gfx.WaitForPresent aren't something that are unnecessary overhead in the game, although you could've known that if you just searched it up on the answers here.
Cheers.
Hi, thanks for your answer. I know that Gfx.WaitForPresent isn't a problem, I always get it regardless of the lag in the game. But my problem here isn't the Gfx spikes, I only mentioned them for additional info, the game lags in the build when I run a development build and start recording in the profiler, and as I said, I can't profile my game because of those lag spikes in the build, nor the editor because the game is unplayable in the editor if the profiler is running.
Then what are the spikes from? Gfx.WaitForPresent won't cause lag. It can just lower the FPS to 60, or maybe 30 (I am not sure). You should see any form of lag from the game in the profiler.
That's the problem, I don't know what the source of the spikes is, In the profiler, it shows up as Gfx.WaitForPresent (When profiling using a development build) and those spikes aren't there when the profiler isn't recording(Doesn't matter if the build is a development build or normal)
Your answer
Follow this Question
Related Questions
I dont know what EditorLoop is in my profiler?,I don't know what EditorLoop is in my profiler? 3 Answers
Can't able to find Addressable Profiler 0 Answers
EditorLoop issue from Profiler. Help me please 0 Answers
Disable Warning message in Console Unity Editor . 1 Answer
Can I profile my app on iOS device with other Editor on Window? 0 Answers