Page 1 of 1
Congratulations and Profiling!
Posted: Sun Sep 25, 2011 10:41 am
by fluffyfreak
Hi everyone,Been away working (Woo!) and without a net connection (Boohoo!) so not had much time or ability to do much lately.That aside I'm sat at my PC right now enjoying the delights of everything I've missed over the last 5 weeks! There's been some really nice changes.Dutifully I grabbed the latest and merged it into my (rather messy) fork to get hacking again... with a tiny hitch. My Debug build under Visual Studio 2010 is so slow as to be completely useless, Release is lightning fast. It looks from the very poor profiles I've managed to get that something is thrashing the Stl Lists around under debug but I can't imagine what and I'm unable to get a better view.So, onto my question: What tools are people using to profile Pioneer?Thus far I've been using some manual and intrusive code side profiling but it's really not cutting it. I'd like an external profiler, preferably free of course!Does anyone have a recommendation?Andy
RE: Congratulations and Profiling!
Posted: Sun Sep 25, 2011 5:22 pm
by robn
I have no idea what's available for MSVC. GCC builds can use gprof (Pioneer has a configure option for it) or you can use valgrind/cachegrind if you've got years to spare.
RE: Congratulations and Profiling!
Posted: Mon Sep 26, 2011 10:36 am
by Luomu
VS2010 profiler should be the first one to try (Analyze -> Launch performance wizard...) but it might only be available from pro upwards.
RE: Congratulations and Profiling!
Posted: Fri Sep 30, 2011 4:59 pm
by fluffyfreak
It should and probably will be but I thought it was Pro and Team editions (and better) only of Visual Studio? I mean I know you can use profile guided optimisation but that's done by instrumented analysis by VS2010 automagically.
RE: Congratulations and Profiling!
Posted: Fri Sep 30, 2011 8:27 pm
by Guest
fluffyfreak wrote:
So, onto my question: What tools are people using to profile Pioneer?
I use Instruments (osx) - still learning how it works actually.
RE: Congratulations and Profiling!
Posted: Wed Oct 05, 2011 4:54 pm
by Olli1981
You can use AMD CodeAnalyst or Intel V-Tune. But you shouldn't profile a debug build. A debug build contains a lot of checks which make it slow. You can profile a release build.
RE: Congratulations and Profiling!
Posted: Thu Oct 06, 2011 5:16 am
by fluffyfreak
Olli1981 wrote:
But you shouldn't profile a debug build. A debug build contains a lot of checks which make it slow. You can profile a release build.
Oh I know, I'm a developer by trade but we have suites of profiling software for what I work on professionally. It's finding _good_ free profiling tools outside work that is difficult!The Debug build is the one I'm interested in, there's no point it even existing if it's so slow that it's non-functional. Something happened to it between Alpha's 13 and Pre-Alpha 15 which means that it is too slow to actually use for debugging now with Visual Studio 2010/2008. This appears to be due to some horrific list thrashing which gets so heavily optimised in Release builds that it doesn't make too much difference on a powerful PC... but on the lower-end machines it might still have a negative impact.Profiling it was just to find out the cause, because I could see the thrashing but not where it was coming from.
RE: Congratulations and Profiling!
Posted: Thu Oct 06, 2011 10:22 am
by matthewfarmery
Ive also noticed that the prelease build that was added in the last MSVSC fix ups, has also got really slow too, still a bit faster then the debug build is is horribly slow, but the prelease is certainly slowed down a lot since then, and sol when stardreaming (when it doesn't crash) is horrible slowso to find this cause of the slowdown would help testing the debug and prelease builds a lot better, I do have a good system, and even that doesn't really help much, so on low end systems it would be horrible
RE: Congratulations and Profiling!
Posted: Thu Oct 06, 2011 10:51 am
by fluffyfreak
Yeah I added the PreRelease version to get some speed back. I've used a similar system in my day job so that you're usually running at 90% of full speed but with most of the debug info.It's pretty bad if that's slowing down too. Something must be destroying or reorganising some pretty massive amounts of data stored in a very inappropriate data structure every frame.The performance comes back if you pause the game but even in an almost empty star system in the middle of space with no other ships, cities, planets nearby it still performs very badly, until paused when the framerate returns.
RE: Congratulations and Profiling!
Posted: Thu Oct 06, 2011 11:01 am
by Olli1981
I've no problems running a debug build with the current code. But I've no compare to the previous version.The game looks great but not the thing I'm looking for.

fluffyfreak wrote:
Olli1981 wrote:
But you shouldn't profile a debug build. A debug build contains a lot of checks which make it slow. You can profile a release build.
Oh I know, I'm a developer by trade but we have suites of profiling software for what I work on professionally. It's finding _good_ free profiling tools outside work that is difficult!
Then you should give AMD CodeAnalyst a try. No matter if you're using and AMD or Intel cpu.
RE: Congratulations and Profiling!
Posted: Thu Oct 06, 2011 11:09 am
by fluffyfreak
Olli1981 wrote:
I've no problems running a debug build with the current code. But I've no compare to the previous version.The game looks great but not the thing I'm looking for.

*snip*Then you should give AMD CodeAnalyst a try. No matter if you're using and AMD or Intel cpu.
The only "problems" are very poor performance which given some of the code I'm writing at the moment (in my "Vavatch" branch if you want to take a look) can bring the release build to it's knees, so what would be a 3-5 fps slideshow in Debug in the normal game becomes 15-seconds-per-frame when I have an Orbital 600,000kms across etc.I've been giving CodeAnalyst a try, it's limited on my Intel machine to pretty crap profiling, but it's a little better on my laptop. I'm away during the week so not getting much time to try it again.Should do once more this weekend.What is it that you're looking for?