Debug Speed VS Release Speed

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

tedlin01
Just popping in
Just popping in
Posts: 12
Joined: Wed Apr 29, 2009 19:22

Debug Speed VS Release Speed

Postby tedlin01 » Thu Dec 02, 2010 21:56

Hello!
I noticed that it's a huge difference in CEGUI speed in debugmode vs releasemode using Visual Studio 2008. Loading the content for CEGUI in debug takes 60 seconds vs 5 seconds in release. Also there is several other features I cant run in debugmode since it's such a huge difference in speed, (resizing for example). Is there some how I can run the releasedlls in debug-mode or some other way I can make CEGUI run alot faster while running debug in visual studio?

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Debug Speed VS Release Speed

Postby Jamarr » Thu Dec 02, 2010 23:42

You should probably build CEGUI in release, with non-optimized code and debug symbols turned on. CE may have added a build option for this (ReleaseWithSymbols?) in later versions.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: Debug Speed VS Release Speed

Postby cCj » Fri Dec 03, 2010 19:06

Hi

you could goto the project settings -> Linker -> Input , and change the CEGUIs lib files from debug to release.

the debug are called CEGUIBase_d.lib
CEGUIOpenGLRenderer_d.lib etc

and Release is without the _d :

CEGUIBase.lib
CEGUIOpenGLRenderer.lib
etc

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Debug Speed VS Release Speed

Postby Jamarr » Fri Dec 03, 2010 20:37

cCj wrote:Hi

you could goto the project settings -> Linker -> Input , and change the CEGUIs lib files from debug to release.

the debug are called CEGUIBase_d.lib
CEGUIOpenGLRenderer_d.lib etc

and Release is without the _d :

CEGUIBase.lib
CEGUIOpenGLRenderer.lib
etc


Assuming he is building a debug version of his own project and using the debug-version of the MSVC runtime, there have been numerous issues attempting to use this release version of the MSVC runtimes with this configuration in the past. This may cause inexplicable errors (crashes in random parts of the code) since objects can/are of different sizes and/or alignments between debug and release versions of the runtime. If he is using the release versions of the MSVC runtime in his own project, then this approach could work out for him.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

tedlin01
Just popping in
Just popping in
Posts: 12
Joined: Wed Apr 29, 2009 19:22

Re: Debug Speed VS Release Speed

Postby tedlin01 » Sat Dec 04, 2010 19:59

Just by using the the release libs I get a crash when starting the program,

ErrorMessage:
Unhandled exception at 0x00884eae in CauseOfWar.exe: 0xC0000005: Access violation reading location 0x0025f9f7.

The debugger points to this code:
"_RELIABILITY_CONTRACT
void __CLRCALL_PURE_OR_CDECL _Mtxlock(_Rmtx *_Mtx)
{ /* lock mutex */
#ifdef _M_CEE
System::Threading::Thread::BeginThreadAffinity();
#endif
EnterCriticalSection(_Mtx);
}
"

EDIT:
SetMouseCursor triggers this error but if I comment it out I get another error :/

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: Debug Speed VS Release Speed

Postby cCj » Sun Dec 05, 2010 17:42

I forgot that you need to change the build type from "Multi-threaded Debug DLL" to "Multi-threaded DLL"..

when u do that debugging capilities maybe effected though.

tedlin01
Just popping in
Just popping in
Posts: 12
Joined: Wed Apr 29, 2009 19:22

Re: Debug Speed VS Release Speed

Postby tedlin01 » Sun Dec 05, 2010 20:41

hm.. it works if i change from _DEBUG to NDEBUG to compile but then I cant trace crashes :P


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests