Matthias Stiller wrote: >> Marcus Lindblom wrote: > >> I've profiled our app and 10% of the time in OSG-dlls is spent in >> GetAspect(). That's quite a bit and therefore I'm happy to see >> c-pointers being introduced in C++. Hopefully, it will also reduce >> compile times & code size. (No more copy-ctoring of FCPtrs >> everywhere). > > I can only second that. But we have also noticed that there seems to be > quite a mess with inlining. VS 2005 has special opinions on what to > inline and what not ... especially with the math stuff (did I mention > that I hate templates).
On inlining, has anybody actually measured that all functions in the .inl files actually _are_ being inlined (I'm quite surprised at times when I look at the asm output ;-). Otherwise, OpenSG is causing a lot of duplicate code to be generated for little benefit. Templates are ok. :) Did you know that you can put template code inside a dll and export instances across dlls? As an example you could explcitly instantiate OSG::TransformationMatrix for float and double in a cpp file (with code for the big functions) and export those. We do this for a lot of our own math and geom classes, and it really cuts down on compile time & object size, as every file doesn't have to instantiate a lot of template code. Cheers, /Marcus ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
