diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-11-14 11:08:31 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-11-14 11:08:31 -0700 |
commit | d41110de20f17f56c0b7b4e62ddfa930cc707ecc (patch) | |
tree | 7a0d6fab4d947127768f8f4b21f9a75197faa8db /indra | |
parent | 6ec5d9943d4637543eacca805d73f859c25a7e07 (diff) |
avoid objects invisiblity checking during login.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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<LLDrawable*> 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); } |