Commits

Kyle Ambroff committed e23411f

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.

Comments (0)

Files changed (2)

indra/newview/app_settings/settings.xml

     <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>

indra/newview/llvocache.cpp

 // 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";
 	if (!mReadOnly)
 	{
 		LLFile::mkdir(mObjectCacheDirName);
-	}	
-	mCacheSize = llclamp(size,
-			     MAX_NUM_OBJECT_ENTRIES, NUM_ENTRIES_TO_PURGE);
+	}
+
+	mCacheSize = size;
 
 	mMetaInfo.mVersion = cache_version;
 	readCacheHeader();
 
 		HeaderEntryInfo* entry ;
 		mNumEntries = 0 ;
-		while(mNumEntries < MAX_NUM_OBJECT_ENTRIES)
+		while(mNumEntries < mCacheSize)
 		{
 			entry = new HeaderEntryInfo() ;
 			if(!checkRead(apr_file, entry, sizeof(HeaderEntryInfo)))
 	}
 
 	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)))