15ms? What’s up with that
As a developer I want to know what’s taking a whole frame to do
15ms? What’s up with that
As a developer I want to know what’s taking a whole frame to do
Having more detailed sublabels in the microprofiler would make finding inefficient code / bugs a lot easier than it is currently.
Present is probably just a call to the SwapChain. It’s taking nearly a whole frame because of VSync.
https://msdn.microsoft.com/en-us/library/windows/desktop/bb174576(v=vs.85).aspx
There are two cases why this can happen:
There’s no way for us to bisect Present further in general because all of the above happens in the OS + the graphics driver and we ourselves unfortunately have zero visibility into that.
However, note that in the case 2 above, this isn’t really doing “work” - it’s just waiting. All other processing (like scripts etc.) is executing during this, so you can think of this as throttling to 60 Hz as opposed to “it takes 15 ms to do smth”.
TL;DR: It’s probably taking a whole frame to wait for the start of the next frame.
Worth noting is that I’ve recently noticed that on Windows 10 on my laptop Present started acting as if it’s in true VSync mode; curiously, switching to Fullscreen and back disables this. No idea why - we don’t do anything to facilitate that