Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting
commit
1c9bb66ba3
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -399,6 +399,7 @@ public:
|
|||
static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not.
|
||||
private:
|
||||
LLViewerRegionImpl * mImpl;
|
||||
LLFrameTimer mRegionTimer;
|
||||
|
||||
F32 mWidth; // Width of region on a side (meters)
|
||||
U64 mHandle;
|
||||
|
|
|
|||
|
|
@ -906,7 +906,7 @@ void LLVOCache::purgeEntries(U32 size)
|
|||
mNumEntries = mHandleEntryMap.size() ;
|
||||
}
|
||||
|
||||
void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, BOOL full_region_cache_probe)
|
||||
void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled)
|
||||
{
|
||||
if(!mEnabled)
|
||||
{
|
||||
|
|
@ -979,7 +979,7 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry:
|
|||
|
||||
for (LLVOCacheEntry::vocache_entry_map_t::const_iterator iter = cache_entry_map.begin(); success && iter != cache_entry_map.end(); ++iter)
|
||||
{
|
||||
if(!full_region_cache_probe || iter->second->isTouched())
|
||||
if(!removal_enabled || iter->second->isTouched())
|
||||
{
|
||||
success = iter->second->writeToFile(&apr_file) ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ public:
|
|||
void removeCache(ELLPath location, bool started = false) ;
|
||||
|
||||
void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ;
|
||||
void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, BOOL full_region_cache_probe);
|
||||
void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled);
|
||||
void removeEntry(U64 handle) ;
|
||||
|
||||
void setReadOnly(BOOL read_only) {mReadOnly = read_only;}
|
||||
|
|
|
|||
Loading…
Reference in New Issue