diff options
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 48ccc7d035..db5684665b 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1071,10 +1071,12 @@ void LLViewerObjectList::fetchObjectCosts() LLSD id_list; U32 object_index = 0; + U32 count = 0; + for ( std::set<LLUUID>::iterator iter = mStaleObjectCost.begin(); iter != mStaleObjectCost.end(); - ++iter) + ) { // Check to see if a request for this object // has already been made. @@ -1084,13 +1086,15 @@ void LLViewerObjectList::fetchObjectCosts() mPendingObjectCost.insert(*iter); id_list[object_index++] = *iter; } - } - // id_list should now contain all - // requests in mStaleObjectCost before, so clear - // it now - mStaleObjectCost.clear(); + mStaleObjectCost.erase(iter++); + if (count++ >= 450) + { + break; + } + } + if ( id_list.size() > 0 ) { LLSD post_data = LLSD::emptyMap(); @@ -1410,6 +1414,10 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) void LLViewerObjectList::updateObjectCost(LLViewerObject* object) { + if (!object->isRoot()) + { //always fetch cost for the parent when fetching cost for children + mStaleObjectCost.insert(((LLViewerObject*)object->getParent())->getID()); + } mStaleObjectCost.insert(object->getID()); } |