Profiling of JBullet threads (or are large BoxCollisionShape more expensive)

I’m creating a compound collision shape out of several BoxCollisionShapes to approximate a shape - so creating something between a mesh accurate shape and a basic collision shape. I have an algorithm to automatically do this - finding the minimum number of boxes of arbitrary shape that fit round the object.

There are two ways I can do this:

  1. Fit minimum number of boxes spanning the region without overlaps (total box volume equal to object volume, moderate number of boxes)
  2. Fit minimum number of boxes spanning the region, allowing overlaps if that reduces total box demand (total box volume much larger than object volume due to overlaps, smaller number of boxes)

The obvious way for me to assess which will be better would be to profile, but (by default) only the LWJGL renderer thread turns up in the profiler.

Is there a way to profile the JBullet behaviour, or failing that; are the computational costs of collision shapes proportional to their enclosed volume, or is it a cost per box irrespective of size.

Also; is this the best way to do this?

You can call the update on PhysicsSpace yourself if you want to check the tim needed for stepping the physics space alone.