diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2013-03-29 22:27:54 -0600 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2013-03-29 22:27:54 -0600 |
| commit | 1c9bb66ba347f93f964c8a1477f23675d529d970 (patch) | |
| tree | 2e6f3e581679706fe10138b2cc14424e673c7e27 /indra/newview/llviewerregion.cpp | |
| parent | cd46f3d08cef6f43c29447e36c920d10ec184a18 (diff) | |
| parent | da02b9f69471baa407188e2921b5c56c9b8d9415 (diff) | |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
| -rw-r--r-- | indra/newview/llviewerregion.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index d8f9ecf248..64cf33a9eb 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -442,6 +442,10 @@ void LLViewerRegion::loadObjectCache() if(LLVOCache::hasInstance()) { LLVOCache::getInstance()->readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap) ; + if (mImpl->mCacheMap.empty())
+ {
+ mCacheDirty = TRUE;
+ } } } @@ -460,11 +464,10 @@ void LLViewerRegion::saveObjectCache() if(LLVOCache::hasInstance()) { - //NOTE: !!!!!!!!!! - //set this to be true when support full region cache probe!!!! - BOOL full_region_cache_probe = FALSE; + const F32 start_time_threshold = 600.0f; //seconds + bool removal_enabled = mRegionTimer.getElapsedTimeF32() > start_time_threshold; //allow to remove invalid objects from object cache file. - LLVOCache::getInstance()->writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty, full_region_cache_probe) ; + LLVOCache::getInstance()->writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty, removal_enabled) ; mCacheDirty = FALSE; } @@ -2176,6 +2179,8 @@ void LLViewerRegion::unpackRegionHandshake() } msg->addU32("Flags", flags ); msg->sendReliable(host); + + mRegionTimer.reset(); //reset region timer. } void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) |
