From d41110de20f17f56c0b7b4e62ddfa930cc707ecc Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 14 Nov 2013 11:08:31 -0700 Subject: avoid objects invisiblity checking during login. --- indra/newview/llviewerregion.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index f58eeb7e0b..e3ebd2fc2a 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1383,6 +1383,10 @@ void LLViewerRegion::killInvisibleObjects(F32 max_time) { return; } + if(sNewObjectCreationThrottle < 0) + { + return; + } LLTimer update_timer; LLVector4a camera_origin; @@ -1391,12 +1395,11 @@ void LLViewerRegion::killInvisibleObjects(F32 max_time) local_origin.load3((LLViewerCamera::getInstance()->getOrigin() - getOriginAgent()).mV); F32 back_threshold = LLVOCacheEntry::sRearFarRadius; - bool unstable = sNewObjectCreationThrottle < 0; - size_t max_update = unstable ? mImpl->mActiveSet.size() : 64; + size_t max_update = 64; if(!mInvisibilityCheckHistory && isViewerCameraStatic()) { //history is clean, reduce number of checking - max_update = llmax(max_update / 2, (size_t)8); + max_update /= 2; } std::vector delete_list; @@ -1414,7 +1417,7 @@ void LLViewerRegion::killInvisibleObjects(F32 max_time) continue; //skip child objects, they are removed with their parent. } - if(!(*iter)->isAnyVisible(camera_origin, local_origin, back_threshold) && (unstable || (*iter)->mLastCameraUpdated < sLastCameraUpdated)) + if(!(*iter)->isAnyVisible(camera_origin, local_origin, back_threshold) && (*iter)->mLastCameraUpdated < sLastCameraUpdated) { killObject((*iter), delete_list); } -- cgit v1.2.3