Jump to content


visual studio 2010 release build slower than debug


9 replies to this topic

#1 v71

    Valued Member

  • Members
  • PipPipPipPip
  • 353 posts

Posted 08 December 2011 - 04:10 PM

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.
Check my code in the c/c++ section :
http://www.binpress.com/browse/c

#2 Sol_HSA

    Senior Member

  • Members
  • PipPipPipPip
  • 510 posts
  • LocationNowhere whenever

Posted 08 December 2011 - 05:34 PM

Profile it. Look up "very sleepy" on google. See what's taking time.
http://iki.fi/sol - my schtuphh

#3 Reedbeta

    DevMaster Staff

  • Administrators
  • 5305 posts
  • LocationBellevue, WA

Posted 08 December 2011 - 06:27 PM

By "the OpenGL rendering is slower", do you mean slower on the GPU or on the CPU?
reedbeta.com - developer blog, OpenGL demos, and other projects

#4 v71

    Valued Member

  • Members
  • PipPipPipPip
  • 353 posts

Posted 08 December 2011 - 06:40 PM

I mean everything, shaders and model rendering is about 20% slower then in debug build
Check my code in the c/c++ section :
http://www.binpress.com/browse/c

#5 v71

    Valued Member

  • Members
  • PipPipPipPip
  • 353 posts

Posted 09 December 2011 - 06:57 PM

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
Check my code in the c/c++ section :
http://www.binpress.com/browse/c

#6 Reedbeta

    DevMaster Staff

  • Administrators
  • 5305 posts
  • LocationBellevue, WA

Posted 09 December 2011 - 09:19 PM

What is the "kifastrect"?
reedbeta.com - developer blog, OpenGL demos, and other projects

#7 TheNut

    Senior Member

  • Moderators
  • 1697 posts
  • LocationThornhill, ON

Posted 09 December 2011 - 10:10 PM

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.
http://www.nutty.ca - Being a nut has its advantages.

#8 v71

    Valued Member

  • Members
  • PipPipPipPip
  • 353 posts

Posted 09 December 2011 - 11:12 PM

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.
Check my code in the c/c++ section :
http://www.binpress.com/browse/c

#9 AticAtac

    Member

  • Members
  • PipPip
  • 87 posts

Posted 12 December 2011 - 09:35 AM

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?

#10 v71

    Valued Member

  • Members
  • PipPipPipPip
  • 353 posts

Posted 30 December 2011 - 12:35 AM

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 ?
Check my code in the c/c++ section :
http://www.binpress.com/browse/c





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users