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:
Shyotl
2013-04-24 17:52:17 -05:00
parent 6f415118ef
commit ef9fbe2193
14 changed files with 210 additions and 89 deletions

View File

@@ -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;
}
//-----------------------------------------------------------------------------