Heavy stutter when NOT debugging OpenGL 1.4 application from Visual Studio

I have noticed a strange behavior: My (very) old school OpenGL 1.4 application stutters a lot on my Titan Xp when not launched from Visual Studio debugger.

  • When I launch my application from Visual Studio debugger, everything is smooth and as expected.
  • When I launch it from Windows Explorer or with “Start Without Debugging”, it shows a lot of stutter (like 0.5 second stall once every two/three seconds in worst cases).

I have noticed this behavior since I have switched from a GeForce 1060 Ti to a Titan Xp.

I have done a clean reinstall of the latest nVidia drivers and I have double checked that I do not have any background debugger like AppVerifier enabled. I have also profiled my application, and it stalls in pseudo random OpenGL commands like glFrustrum (like taking 80% of the frame once every two seconds). I know that I have two glGetDoublev per frame (very old code!), unfortunately, removing them does not fix the issue.

After two days of profiling, I believe that the problem may be related to the 3D driver, or maybe Windows, trying to apply improper settings when my application is started WITHOUT a debugger.

I did not notice this problem with the GeForce 1060 Ti, neither with an Intel i7 GPU on a MacBook Air.

To reproduce the issue, simply:

  • Install the latest non-beta version of Tacview from http://tacview.net/download
  • Launch it from the explorer
  • And scroll quickly around the earth (zoomed in or not)

I understand that my rendering code is sub optimal. What I do not understand, is the different behavior with and without a debugger. My code timing is exactly the same in both case… (same background data streaming speed for example)

I can reproduce the problem, in debug, profile, release, x32 and x64. So, this is not related to the way the code is generated/compiled.

Does this ring a bell to anyone?

(Windows 10 Pro 64-bit Build 16299 + nVidia Titan Xp 24.21.13.9836)

Here is an update:

I have just found that launching my exe in “Windows 8” compatibility mode fixes the issue (smooth frame-rate even in debug).

Now, I have to understand what is wrong with my manifest, or my code, to not run well in native Windows 10 mode…