visual studio 2010 release build slower than debug

Ceee4d1295c32a0c1c08a9eae8c9459d
0
v71 105 Dec 08, 2011 at 16:10

Hi everybody i am experiencing a strange issue , the release build of my mfc application is slower than the debug.
I have checked all optimisations and it is still slower.
What am i doing wrong ?
i am using stl and lib3ds as a dll, but i don’t think that this is the problem, the opengl rendering is noticebly (sp??) slower than the debug build.

9 Replies

Please log in or register to post a reply.

3c5be51fdeec526e1f232d6b68cc0954
0
Sol_HSA 119 Dec 08, 2011 at 17:34

Profile it. Look up “very sleepy” on google. See what’s taking time.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Dec 08, 2011 at 18:27

By “the OpenGL rendering is slower”, do you mean slower on the GPU or on the CPU?

Ceee4d1295c32a0c1c08a9eae8c9459d
0
v71 105 Dec 08, 2011 at 18:40

I mean everything, shaders and model rendering is about 20% slower then in debug build

Ceee4d1295c32a0c1c08a9eae8c9459d
0
v71 105 Dec 09, 2011 at 18:57

i have downloaded “very sleepy”, much of the time is taken by the kifastrect (98%), this is true both for release and for debug as well.
I have tried to make the rednering window smaller and the culprit is in the opengl driver, in release build is slower than in rebuild.
Has anyone ever experienced anything like that ? Is it possible that the mfc application is slowing down the release build in
some way ?
thanks

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Dec 09, 2011 at 21:19

What is the “kifastrect”?

6837d514b487de395be51432d9cdd078
0
TheNut 179 Dec 09, 2011 at 22:10

Did you check your timers? Is your game run loop operating at a fixed FPS? Debug vs release builds can often involve different precision that may effect this, especially if you’re using the clock() function (which you shouldn’t be if you are). Also, check your optimization properties. Try using just the project defaults (typically, optimize for speed is enabled with all other options disabled). Continue playing with the options until you can see a difference. I’ve never had problems with the 2010 compiler, but I remember running into constant issues with the VC 6 compiler optimizing code in ways it shouldn’t have (sometimes outright deleting code!).

Other than that, profiling your code will be the only way to track down the issue. You may need to manually disable code and enable them one at a time to trace the issue.

Ceee4d1295c32a0c1c08a9eae8c9459d
0
v71 105 Dec 09, 2011 at 23:12

I am not running a fps timer right now, but i can see a sensible difference in rendering within the opengl context, the release build is slower than debug build and the difference can be detected with the naked eye.

3660f98ccd9e7079e44572e870c24113
0
AticAtac 101 Dec 12, 2011 at 09:35

Post (or attach the files) your release and debug project settings here. That might be easier to check all the settings for other people here.
Also, how about to reinstall the drivers and opengl-sdk again?

Ceee4d1295c32a0c1c08a9eae8c9459d
0
v71 105 Dec 30, 2011 at 00:35

I have used ‘very sleepy’ and i found that the driver kifastsystemrect is probably the responsible of the slowing down.
Is it possible that in release mode somehow the vsync is messing arond with the driver’s calls ?
i have filed a question to nvidia but they aren’t answeinrg.
Has anybody ever noticed this problem before ?