v71 at December 8th, 2011 11:10 — #1
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.
sol_hsa at December 8th, 2011 12:34 — #2
Profile it. Look up "very sleepy" on google. See what's taking time.
reedbeta at December 8th, 2011 13:27 — #3
By "the OpenGL rendering is slower", do you mean slower on the GPU or on the CPU?
v71 at December 8th, 2011 13:40 — #4
I mean everything, shaders and model rendering is about 20% slower then in debug build
v71 at December 9th, 2011 13:57 — #5
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 ?
reedbeta at December 9th, 2011 16:19 — #6
What is the "kifastrect"?
thenut at December 9th, 2011 17:10 — #7
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.
v71 at December 9th, 2011 18:12 — #8
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.
aticatac at December 12th, 2011 04:35 — #9
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?
v71 at December 29th, 2011 19:35 — #10
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 ?