Profiling orxonox.exe

A place to discuss everything about the Orxonox framework.

Moderator: PPS-Leaders

Post Reply
User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Profiling orxonox.exe

Post by 1337 » Fri Mar 13, 2009 12:41 pm

Since the ETH offers you free access to most of the M$ developer tools, I got myself the Visual Studio 2008 Team Suite, which would cost about four grand on the market ;)
It includes a profiler that actually does quite a good job because it has a simple mode as well. That mode does not measure the times spent in every function but rather takes samples. A sample is one little measurement that only evaluates the call stack at a specific moment.
The sampling rate is approximately 160/s, so I ran the test on a time frame of about 10 minutes.

Specs:
- Windows XP, compiling with Visual Studio 2008, Core Duo 2 GHz, 2 GB RAM
- Dedicated mode, unlimited fps, no clients, 30 bots, level loading excluded

Results:
I have attached three jpegs (yeah, there is no way to export it sorted and usefully). A short explanation about 'inclusive' and 'exclusive'. The latter means the samples in the particular function only. So when the sample was taken, this function was on top of the call stack. 'inclusive' also accounts when a child function was called.

Interpretation:
I have done some research on why the dynamic_cast might be so expensive and especially why it uses _strcmp. My worst fears were met:
Microsoft uses string comparisons of the whole class name (and templates can makes names veeery long)! How stupid is this for compiler that performs quite well in other applications?
http://www.gamedev.net/community/forums ... _id=508788

Another thing to note is the SceneNode udate function. Either badly implemented in OGRE or it really does use that much performance.
Anyway I don't see a way around it.

Notes:
When running standalone the spent in OGRE outweighs anything else (about 80% or so).


here we go:
http://www.orxonox.net/wiki/reto/Profiling
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Post by beni » Wed Mar 18, 2009 8:44 am

Very interesting work there. Very helpful indeed.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Wed Mar 18, 2009 9:00 am

I would like to add some information on why BaseObject::setMainState() uses that much load even if the function is really very small:
The problem seems to be that the function calls a functor which in turn always creates a MultiType, which seems to be expensive.
A solution would be to replace it with a simple function pointer since I think the signature shouldn't differ.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Post by x3n » Wed Mar 18, 2009 3:32 pm

I'll have a look at it, thanks.
Fabian 'x3n' Landau, Orxonox developer

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests