Something is causing the editor to get unusably low framerates in the editor. Using the profiler, I can see that Gfx.waitForPresent is spinning for around 100ms at each lag spike. Now, I’ve been around Unity for a while now, and I know that Gfx.waitForPresent is VSync, but no matter what the target framerate is, it should never have to wait 100ms between frames. Here’s a screenshot of the profiler on an empty scene in a new project when I just try to move the editor camera around:
I found a solution for my computer. If you have a laptop with an NVIDIA GPU, check if the problem only happens when you have the AC unplugged. If so, open Geforce Experience and go to Settings > Games. There’s a setting called “Battery Boost”, turn that off completely or move the FPS setting within it up to 60 FPS.
I believe I have found the solution; it worked on my project at least! This “Gfx.WaitForPresent” was being caused by a tiny checkbox in the “Player” settings. Uncheck “Graphics Jobs (Experimental)” and you should see that “Gfx.WaitForPresent” has either been completely removed or at least greatly reduced.
I have the same GPU and probably the same monitor as you and I had this exact issue. For me the fix was turning off G-SYNC in the NVIDIA control panel.
I don’t have Graphics Jobs (Experimental) checked, yet still see 63% Gfx.WaitForPresent. I also don’t even have a GPU. See attached. Any ideas?alt text
If you are on MacOS disabling Metal might help with this. My Mac mini with integrated graphics was chugging along on simple scenes between 45-60fps. After disabling Metal my FPS is in the hundreds!
Project settings > Player > Other settings > Rendering > Auto Graphics API For Mac (uncheck)
Then drag OpenGLCore above Metal in the list.