Hi Jannik, > Release build, Ubuntu 14.04 64 bit, g++ 4.8.2 > > In 3.2, the Update phase for this change takes 0.15ms. > In svn/trunk, it's 1 ms. > > That's a factor 6 performance regression for the base cost of node callbacks.
I have introduced Object::asNode(), asNodeVisitor(), asStateAttribute() and asUniform() to Object base class, and usage of this in Callback.cpp to replace dynamic_cast<> usage. With a tweaked version of your modified example and 100,000 callbacks I'm getting slightly over 3x speed up, based on frame rate. One thing to be wary of with these tests is what happens with the CPU frequency as powersaving can play havoc with accurate timing. > What was the rationale for unifying all callbacks under a common base class? It enables scripting integration, where the script can provide a callback from the script itself without need for hardwiring to different types of callbacks. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

