Performance issue adding objects when using btDbvtBroadphase
Posted: Sat Aug 09, 2008 9:21 pm
My project is a streaming world setup using btDbvtBroadphase, and collision only not dynamics.
Whenever I stream in new objects and insert them to the collision system I get a noticable hitch (sometimes as long as a quarter to half second). The objects come in groups of a few dozen at a time.
A profile shows it spending a significant amount of time in the Proximity() function in btDbvt.h. Which is doing some simple add/subtracts and then 3 btFabs() which are just going into fabs(). Shouldn't this be using SSE? in any case fabs() is terribly slow and on the x86 architecture you can abs a float by clearing the sign bit (which I temporarily did in Proximity() and it took it almost completely out of the profile).
Anyway it also spends a decent amount of time in the various other parts of btDbvt during the insert.
Is there something I can do to make this faster? It is scheduled to be optimized?
Roy
Whenever I stream in new objects and insert them to the collision system I get a noticable hitch (sometimes as long as a quarter to half second). The objects come in groups of a few dozen at a time.
A profile shows it spending a significant amount of time in the Proximity() function in btDbvt.h. Which is doing some simple add/subtracts and then 3 btFabs() which are just going into fabs(). Shouldn't this be using SSE? in any case fabs() is terribly slow and on the x86 architecture you can abs a float by clearing the sign bit (which I temporarily did in Proximity() and it took it almost completely out of the profile).
Anyway it also spends a decent amount of time in the various other parts of btDbvt during the insert.
Is there something I can do to make this faster? It is scheduled to be optimized?
Roy