summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2026-01-12 02:32:19 -0500
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-01-21 22:07:08 +0200
commit4dcd070ef310cec9c027fd29cc7c486674cc98c8 (patch)
tree26b97ed9e4be9e9faa93be17db9ae47ae5f5c45b /indra/newview
parent2f8d6420f346b6ee8c98860030b03d79ff88a9c4 (diff)
Disable disk cache LRU purge on main thread during startup by default and instead rely on background thread purge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llappviewer.cpp13
2 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5a1a1187a0..d81756f647 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -16563,5 +16563,16 @@
<key>Value</key>
<integer>2</integer>
</map>
+ <key>PurgeDiskCacheOnStartup</key>
+ <map>
+ <key>Comment</key>
+ <string>Whether or not to LRU purge the disk cache during startup on main thread</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 8d9fb32bf0..e016d0e341 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4470,19 +4470,22 @@ bool LLAppViewer::initCache()
if (mPurgeCache)
{
- LLSplashScreen::update(LLTrans::getString("StartupClearingCache"));
- purgeCache();
+ LLSplashScreen::update(LLTrans::getString("StartupClearingCache"));
+ purgeCache();
// clear the new C++ file system based cache
LLDiskCache::getInstance()->clearCache();
- }
- else
+ }
+ else if (gSavedSettings.getBOOL("PurgeDiskCacheOnStartup"))
{
// purge excessive files from the new file system based cache
LLDiskCache::getInstance()->purge();
}
+
+ // Start disk cache purge thread to
+ // purge excessive files from the file system based cache
+ LLAppViewer::getPurgeDiskCacheThread()->start();
}
- LLAppViewer::getPurgeDiskCacheThread()->start();
LLSplashScreen::update(LLTrans::getString("StartupInitializingTextureCache"));