Speed Topic is solved

Problems building or running the engine, queries about how to use features etc.
Guest

Speed

Post by Guest »

Ok, i have a problem with ogre and its speed, although it could very well (it probably is :) ) me. WHa ti have done is used ogre ref app, and using a generic scene manager. I have a class that loads a map( its a simple tile map -- either a wall or a floor tile ) and it creates the ODE entities using the reference applayer. No dybnamics or anything, they are just static. The level i have loaded is a 10 by 10 matrix and the dimensions of each cube is 100x100x100. When run in debug mode, i get roughly .3 frames a second, but in release mode i get 180+. What could cause this slowdown/how coudl i do this better?
User avatar
dhaley
Gnoblar
Posts: 10
Joined: Sun Dec 07, 2003 9:34 pm
Location: Stanford, CA, USA

Post by dhaley »

You somewhat answered the question yourself: it's debug vs. release mode.
That's just one of the properties of debug mode: it's slow. Sometimes, it's not so bad; other times (such as in your case) the difference is painfully visible.

One thing you could do is tweak your debug mode project settings, see if you can turn on optimizations or whatever without turning off the debugging information. However, I'm not sure that's possible.

Another idea would be to link the debug version of your program against a release version of Ogre (as opposed to a debug version of Ogre.) Same for ODE. That way, only your code is in debug mode and therefore slowing down.
- david haley -
Guest

Post by Guest »

thanks, thats what i feared it was. I'll try linking it to release modes... i jsut through perhaps i was doing something in abad way taht caused it...
thanks for the ansawer, time to go a'tweakin
User avatar
Peggus
Gnoblar
Posts: 11
Joined: Tue Aug 10, 2004 9:08 pm
Location: Pasadena, CA

Post by Peggus »

This could also be a effect of memory leaks. I once experienced massive slowdowns in debug mode while the app ran perfectly fine in release mode for quite some time. It turned out that I was passing a pointer to an INT when I was supposed to pass a pointer to an array of INT. I presume the debugger slowed down cause it kept trapping the memory leaks, while the release version more or less ignored them.
I'm far from an expert though.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Both for GL and D3D? Anyway, debug mode is supposed to be slow. But that slow?
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2

Post by Kencho »

Is any log file too big? Maybe the slowdown is because of logging into disk... I've noticed serious slowdowns when I tried to log too many things each frame. Check for all ogre.log, edgelist logs...
Image
stodge
Goblin
Posts: 217
Joined: Thu Oct 24, 2002 4:12 am
x 1

Post by stodge »

Yes the difference between debug and release mode can be that big.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

This is an ancient thread anyway - why resurrect it?
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2

Post by Kencho »

:lol: Didn't notice that!! :lol: :lol:
Image