Expose pushProfileTimer / pop ProfileTimer in PhysicsClient API to benchmark Python parts of PyBullet.
reduce 'm_cooldownTime' from 1000 microseconds to 100 microseconds (overhead in raycast is too large) If needed, we can expose this cooldown time. Replace malloc by btAlignedObjectArray (going through Bullet's memory allocator)
This commit is contained in:
@@ -781,7 +781,8 @@ int btSequentialImpulseConstraintSolver::getOrInitSolverBody(btCollisionObject&
|
||||
else
|
||||
{
|
||||
// Incorrectly set collision object flags can degrade performance in various ways.
|
||||
btAssert( body.isStaticOrKinematicObject() );
|
||||
//btAssert( body.isStaticOrKinematicObject() );
|
||||
//it could be a multibody link collider
|
||||
// all fixed bodies (inf mass) get mapped to a single solver id
|
||||
if ( m_fixedBodyId < 0 )
|
||||
{
|
||||
|
||||
@@ -412,11 +412,13 @@ static void WorkerThreadFunc( void* userPtr )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// go sleep
|
||||
localStorage->m_mutex.lock();
|
||||
localStorage->m_status = WorkerThreadStatus::kSleeping;
|
||||
localStorage->m_mutex.unlock();
|
||||
{
|
||||
BT_PROFILE("sleep");
|
||||
// go sleep
|
||||
localStorage->m_mutex.lock();
|
||||
localStorage->m_status = WorkerThreadStatus::kSleeping;
|
||||
localStorage->m_mutex.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -503,7 +505,7 @@ public:
|
||||
storage.m_threadId = i;
|
||||
storage.m_directive = m_workerDirective;
|
||||
storage.m_status = WorkerThreadStatus::kSleeping;
|
||||
storage.m_cooldownTime = 1000; // 1000 microseconds, threads go to sleep after this long if they have nothing to do
|
||||
storage.m_cooldownTime = 100; // 100 microseconds, threads go to sleep after this long if they have nothing to do
|
||||
storage.m_clock = &m_clock;
|
||||
storage.m_queue = m_perThreadJobQueues[i];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user