diff options
author | Kent Quirk <q@lindenlab.com> | 2010-11-05 17:32:27 -0400 |
---|---|---|
committer | Kent Quirk <q@lindenlab.com> | 2010-11-05 17:32:27 -0400 |
commit | 049a1a8e3827381d7e09faafc7088f81520e0ea9 (patch) | |
tree | 524c7a5a66b6b02ae5bfc59467f416e76d114f27 /indra/newview | |
parent | 9377b7d41bf93151dc667e4c45714144093a4555 (diff) | |
parent | d5d389f062a042dfe65636f9ece6bc69bbd95065 (diff) |
merge
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 4 | ||||
-rw-r--r-- | indra/newview/llvocache.cpp | 13 |
2 files changed, 8 insertions, 9 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index cefcb3d9b1..ee01ee7833 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1150,13 +1150,13 @@ <key>CacheNumberOfRegionsForObjects</key> <map> <key>Comment</key> - <string>Controls number of regions to be cached for objects, ranges from 16 to 128.</string> + <string>Controls number of regions to be cached for objects.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>U32</string> <key>Value</key> - <integer>128</integer> + <integer>20000</integer> </map> <key>CacheSize</key> <map> 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))) |