diff options
author | Dave Parks <davep@lindenlab.com> | 2010-02-03 12:33:32 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-02-03 12:33:32 -0600 |
commit | 8e67ecf3dcd5f168806389a1048b2632582feedb (patch) | |
tree | f63793ae6b972f6205b07769dd7abc9c91690d71 /indra/newview/llvovolume.cpp | |
parent | 5d7c376332b090801b503d8dc154bb67771230d8 (diff) |
Optimization pass.
-- Further instrumentation of idle update
-- Removed mActiveQ from LLPipeline, instead making calm objects static during LLVOVolume::idleUpdate
-- Further instrumentation of flexible object update
-- Converted LLDynamicArray and LLMap members of LLViewerObjectList to stl counterparts
-- Increased number of update bins in LLViewerObjectList from 16 to 128 (objects will be processed every 128 frames instead of every 16, or ~ 90% fewer objects processed per frame)
-- Removed unused "renderObjectsForSelect" code.
-- Reenabled LOD updates for objects further than 24m from camera
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index bfe38c14ba..3cdf485d7d 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -597,6 +597,9 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { LLViewerObject::idleUpdate(agent, world, time); + static LLFastTimer::DeclareTimer ftm("Volume"); + LLFastTimer t(ftm); + if (mDead || mDrawable.isNull()) { return TRUE; @@ -618,6 +621,18 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) mVolumeImpl->doIdleUpdate(agent, world, time); } + const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40; + + if (mDrawable->isActive()) + { + if (mDrawable->isRoot() && + mDrawable->mQuietCount++ > MAX_ACTIVE_OBJECT_QUIET_FRAMES && + (!mDrawable->getParent() || !mDrawable->getParent()->isActive())) + { + mDrawable->makeStatic(); + } + } + return TRUE; } @@ -1035,7 +1050,7 @@ BOOL LLVOVolume::calcLOD() S32 cur_detail = 0; F32 radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length(); - F32 distance = llmin(mDrawable->mDistanceWRTCamera, MAX_LOD_DISTANCE); + F32 distance = mDrawable->mDistanceWRTCamera; //llmin(mDrawable->mDistanceWRTCamera, MAX_LOD_DISTANCE); distance *= sDistanceFactor; F32 rampDist = LLVOVolume::sLODFactor * 2; |