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

@@ -469,6 +469,7 @@ void LLCharacter::addSharedVisualParam(LLVisualParam *param)
void LLCharacter::addVisualParam(LLVisualParam *param)
{
S32 index = param->getID();
// Add Index map
std::pair<visual_param_index_map_t::iterator, bool> idxres;
idxres = mVisualParamIndexMap.insert(visual_param_index_map_t::value_type(index, param));
@@ -479,6 +480,8 @@ void LLCharacter::addVisualParam(LLVisualParam *param)
visual_param_index_map_t::iterator index_iter = idxres.first;
index_iter->second = param;
}
mVisualParamSortedVector[index] = param;
if (param->getInfo())
{