3.3.1 and WP7 Performance

Apr 14, 2011 at 1:32 PM

Hi Guys,

I just upgraded from 3.2 to 3.3.1 and I am seeing a drop in performance on WP7 resulting in much lower framerates. The only code I had to tweak was the CollisionGroup and CollidesWith properties being moved around a bit.

Before I try to profile this, I was wondering if anyone noticed the same thing? Anything I should look for in particular?


Apr 14, 2011 at 3:43 PM

Hi Andy,

I've not had the opportunity to profile the 3.3 release as my WP7 is having trouble getting unlocked. If you find any bottlenecks on WP7, feel free to contact me and I'll be sure to get the issue resolved in 3.4.

Apr 14, 2011 at 6:00 PM

Sorry for the False Alarm, this was my bad. When I brought in the new code I overwrote my Settings.cs in which I had this set to True:

    public static bool UseFPECollisionCategories = true;

I think this has been brought up before in an XBOX thread, but also on WP7, a LOT of the CPU is used up in the DynamicTreeBroadPhase.UpdatePairs method, with much of that time taken up in the DynamicTree.Query. Not sure if there are any tweaks that can be made in there, but every little bit really counts on these .NET CF platforms.

(btw, I used the Eqatec profiler, but did you see the new VS WP7 profiler coming to Mango? Awe-sum! Can't wait).

Jun 10, 2011 at 4:07 AM

I expect you will find the performance of DynamicTreeBoradPhase.UpdatePairs is no longer a problem in the current source code. My (fairly) recent commits have improved this function considerably by disabling the tree rebalancing. Erin Catto confirmed this was intentional in the box2d code I pulled over that was the source of this.

Jun 10, 2011 at 11:55 AM

That's great news Eric, I will give it a try!