Bullet Broadphase performance issues

Hi,

I currently have in my testscenario, 30 Physicspaces (different sectors of a space game) and a total of 10000 static solid Hullcollisionshapes. Now even without any! dynamic or kinematic shape the performance is kinda low, around 80ms or even worse, for one tick of all physicspaces. I could easily write a own jme side prebroadphase, that would remove all objects that are far away from dynamic ones, and that would probably improve the performance quite a bit. However I first want to understand, what exactly is creating the high cost in Bullet in this scenario, after all the broadphase should be able to quickly notice that no collisions are possible at all, and just return without much work.

Physicspaces are created like this, with no further configuration being done (if someone knows a trick here)
final PhysicsSpace pspace = new PhysicsSpace();
pspace.setAccuracy(1 / 20f);
pspace.setMaxSubSteps(0);

I use a fixed timestep for updates 1/20th of a second, because I would rather have the game slow down, than creating unpredicted behavior due to to long steps.

I don’t have an answer, but I do know that you can change the threading type to parallel:

Thanks, however I’m not useing the app state, or even jme around the physicspaces. The issue is much less getting it to run fast, than to first understand, why this is actually as slow as it is.

I’m curious to see what you find out… I’m using Bullet in much the same way as you on my server - no AppState, many separate PhysicsSpaces.