diff options
author | Kyle Ambroff <ambroff@lindenlab.com> | 2010-11-04 12:37:02 -0700 |
---|---|---|
committer | Kyle Ambroff <ambroff@lindenlab.com> | 2010-11-04 12:37:02 -0700 |
commit | 0dbf75ab657446b51e6e9795ddccc16bb9f6fd02 (patch) | |
tree | 914306858cbaf9394cc9ba239132dff6b2be4617 /indra/newview/llvocache.cpp | |
parent | fa17864382a64c90e9106a54368386f6e4115d67 (diff) |
ER-281: Object cache limit is too low in the viewer
* Bump CacheNumberOfRegionsForObjects up to 20k in the default settings.
* Make LLVOCache *actually* use this setting, with no upper bound.
Reviewed with Kelly.
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rw-r--r-- | indra/newview/llvocache.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 8bdb8e069e..34e9babe2c 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -223,7 +223,6 @@ BOOL LLVOCacheEntry::writeToFile(LLAPRFile* apr_file) const // Format string used to construct filename for the object cache static const char OBJECT_CACHE_FILENAME[] = "objects_%d_%d.slc"; -const U32 MAX_NUM_OBJECT_ENTRIES = 128 ; const U32 NUM_ENTRIES_TO_PURGE = 16 ; const char* object_cache_dirname = "objectcache"; const char* header_filename = "object.cache"; @@ -291,9 +290,9 @@ void LLVOCache::initCache(ELLPath location, U32 size, U32 cache_version) if (!mReadOnly) { LLFile::mkdir(mObjectCacheDirName); - } - mCacheSize = llclamp(size, - MAX_NUM_OBJECT_ENTRIES, NUM_ENTRIES_TO_PURGE); + } + + mCacheSize = size; mMetaInfo.mVersion = cache_version; readCacheHeader(); @@ -424,7 +423,7 @@ void LLVOCache::readCacheHeader() HeaderEntryInfo* entry ; mNumEntries = 0 ; - while(mNumEntries < MAX_NUM_OBJECT_ENTRIES) + while(mNumEntries < mCacheSize) { entry = new HeaderEntryInfo() ; if(!checkRead(apr_file, entry, sizeof(HeaderEntryInfo))) @@ -477,10 +476,10 @@ void LLVOCache::writeCacheHeader() } mNumEntries = mHeaderEntryQueue.size() ; - if(mNumEntries < MAX_NUM_OBJECT_ENTRIES) + if(mNumEntries < mCacheSize) { HeaderEntryInfo* entry = new HeaderEntryInfo() ; - for(S32 i = mNumEntries ; i < MAX_NUM_OBJECT_ENTRIES ; i++) + for(S32 i = mNumEntries ; i < mCacheSize; i++) { //fill the cache with the default entry. if(!checkWrite(apr_file, entry, sizeof(HeaderEntryInfo))) |