Robert Osfield wrote: > Hi Marco, > > On Fri, Mar 28, 2008 at 5:52 PM, Marco Jez <[EMAIL PROTECTED]> wrote: > >> Hi everybody, long time no see! >> > > Welcome back ;-) > > >> The good news: little changes were needed to make my apps compile with OSG >> 2.3. The bad news: the same apps now consume much more RAM, and they also >> run slower. In brief, here are the results for one of my largest >> applications (with lots of compressed DDS textures): >> >> Compiler: Visual C++ 7.1 >> OSG+OpenThreads: 1.2 >> Total RAM usage: 380 MB >> Frame rate (reference view): 30 FPS >> >> Compiler: Visual C++ 9.0 >> OSG+OpenThreads: 1.2 >> >> Total RAM usage: 380 MB >> Frame rate (reference view): 27 FPS >> >> >> Compiler: Visual C++ 9.0 >> OSG+OpenThreads: latest SVN (2.3.6) >> >> Total RAM usage: 760 MB >> Frame rate (reference view): 23 FPS >> >> The OS is Windows XP Professional SP2. >> In all tests, VSync was ON, and the refresh rate was 75 Hz. The test scene >> doesn't contain any paged LODs. >> >> This is only a quick report, more details to come. Before I try to >> understand what's going on, is there anything that I might have overlooked, >> as for example any optimizations whose default values have changed since OSG >> 1.2? >> > > Check the CMake build options for release vs debug. > > The other possibility is the default enabling of theadsafe ref/unref > for the majority of scene graph objects. I certainly don't see big > differences under Linux with enabled - just a couple of percent in > cull traversal for big scenes, but you never know the Windows > OpenThreads::Mutex might be dog slow compared to Pthreads. You can > enable threadsafe ref/unref in 1.2 and find out, its more awkward to > disable under 2.x though as a number of objects explicitly set the > thread safe ref/unref. > > The wider use of thread safe ref/unref is what you have to pay for > greater stability when multi-threading, and with 2.x threading is much > more prevalent once you start using osgViewer. The new threading > models should mean you should get better performance once you start > utilising them. > > Robert. > I hate taking this thread off subject, but if thread safe ref/unref are causing performance problems you might want to look at how boost does their shared_ptr. They have implemented atomic (without using a mutex) ref/unref operations for most if not all of their platforms they support.
-- Judd Tracy Institute for Simulation and Training University of Central Florida 407-882-1405 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

