summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobjectlist.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-06-19 18:08:39 -0500
committerDave Parks <davep@lindenlab.com>2012-06-19 18:08:39 -0500
commit029103133ebac7ee13f1af767f41b012d19a84f5 (patch)
treec531d0662f06b0bd721485cf28e3e40e1b1d0f3e /indra/newview/llviewerobjectlist.cpp
parenta1d0d67e05c45bdc1a7a8bb0aad79772a2a94f6e (diff)
MAINT-794 Factor out a lot of CPU overhead around updating objects.
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r--indra/newview/llviewerobjectlist.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 383d4a7955..21a0331f70 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -923,8 +923,6 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
const F64 frame_time = LLFrameTimer::getElapsedSeconds();
- std::vector<LLViewerObject*> kill_list;
- S32 num_active_objects = 0;
LLViewerObject *objectp = NULL;
// Make a copy of the list in case something in idleUpdate() messes with it
@@ -964,8 +962,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
std::vector<LLViewerObject*>::iterator idle_end = idle_list.begin()+idle_count;
if (gSavedSettings.getBOOL("FreezeTime"))
- {
-
+ {
for (std::vector<LLViewerObject*>::iterator iter = idle_list.begin();
iter != idle_end; iter++)
{
@@ -982,21 +979,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
idle_iter != idle_end; idle_iter++)
{
objectp = *idle_iter;
- if (objectp->idleUpdate(agent, world, frame_time))
- {
- num_active_objects++;
- }
- else
- {
- // If Idle Update returns false, kill object!
- kill_list.push_back(objectp);
- }
- }
- for (std::vector<LLViewerObject*>::iterator kill_iter = kill_list.begin();
- kill_iter != kill_list.end(); kill_iter++)
- {
- objectp = *kill_iter;
- killObject(objectp);
+ objectp->idleUpdate(agent, world, frame_time);
}
}
@@ -1066,7 +1049,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world)
*/
LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size());
- LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(num_active_objects);
+ LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(idle_count);
LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled);
LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled);
}