Hi Keith,

I was using a debug build. I'm trying out a release build, but I am
swamped and trying to do a bunch of things. I'll get back sometime in
the next day with my results. I'm hoping this is it because the one
difference between osgviewer and my app is that I am using debug libs.

Ah, so my apologies to Robert, he was right to mention it. I thought that had been mentioned at the beginning of the thread, but it must have been another thread.

As both Robert and I said, doing any kind of performance measurement in VC++ in Debug builds will lead to bad results (unrepresentative of the real performance). I've seen cases where the performance from one run to the next was totally different, with no changes to source code, with Debug builds. So try to find out what's slowing down the program in that case... :-)

But using a Release build (optimization turned on, Release C++ runtime, Release STL) with debugging symbols turned on (/Z* compiler options and /DEBUG linker option) is fine, performance will be a bit slower but still representative.

And another part of the equation is running in the debugger or not. Pressing F5 attaches the debugger, whether in Debug or Release builds. That slows things down a bit too (because the debugger can show you what DLLs have been loaded while it's happening, things like that). Pressing Ctrl-F5 does not attach the debugger, whether in Debug or Release builds. You always have the option to attach it later (when a crash happens, or when you get to the point in your app that you want to trace), by using the Debug - Attach to Process menu option.

If doing performance testing, I will use a Release build, no debugging symbols, and press Ctrl-F5 to get accurate results (the same as an end-user would get on my machine).

I've seen especially large slowdowns when running in the debugger versus not running in the debugger (even with Release builds) when using boost::persistence, but that's just one example. So in that case I might start with Ctrl-F5, load our data files (which is done with boost::persistence), and then attach the debugger once boost::persistence has finished doing its thing.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to