Attempt to speed up agent idle update by optimizing wearable/visualparam related lookups/iterations a bit more.
Generalized several templates in llstl.h in order to support more containers. Removed several instances of is_in_map/getWearableCount being followed immediately by another lookup with the same key. find is more efficient, as we get an iterator to use instead of a simple boolean.
This commit is contained in:
@@ -83,13 +83,7 @@ LLMotionRegistry::~LLMotionRegistry()
|
||||
BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor )
|
||||
{
|
||||
// llinfos << "Registering motion: " << name << llendl;
|
||||
if (!is_in_map(mMotionTable, id))
|
||||
{
|
||||
mMotionTable[id] = constructor;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return mMotionTable.insert(std::make_pair(id,constructor)).second;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user