b2DynamicTree::ComputeHeight really slow...

Hi all,

I'm total Box2D newb so this is probably me doing something really stupid. I'm generating a world made up of loads of boxes (well, tiles really). When I implemented the Box2D object creation stuff, the level loading started taking a *REALLY* long time. What was a couple of seconds is now 20-30 seconds.

When I ran a profiler on the code, it said that 78% of the time was taken up with b2DynamicTree::ComputeHeight. All I'm doing is calling CreateBody and CreateFixture (passing in the shape) for each object. There are a *lot* of objects but I wasn't expecting this much slow down during the creation of the objects.

Any ideas?

Luke.
Actually, ignore me, I just realized exactly how many objects I'm trying to add... back to the drawing board.
The ComputeHeight call has been removed from the latest development version in SVN.
Boris/other Box2DFlash dev, is it a good idea to remove the ComputeFullHeight call(s) from b2DynamicTree::CreateProxy? My profiling is showing 7ms per call! 🙁
On the Box2DFlash side, I return from CreateProxy without doing a tree rebalance/computefullheight. After all the fixtures are created, I do a 10,000 iteration rebalance on the tree one time. This seems to operate much better.

Original thread: https://box2d.org/forum/viewtopic.php?t=5278