From 4dcd070ef310cec9c027fd29cc7c486674cc98c8 Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 12 Jan 2026 02:32:19 -0500 Subject: Disable disk cache LRU purge on main thread during startup by default and instead rely on background thread purge --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llappviewer.cpp | 13 ++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'indra') 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 @@ Value 2 + PurgeDiskCacheOnStartup + + Comment + Whether or not to LRU purge the disk cache during startup on main thread + Persist + 1 + Type + Boolean + Value + 0 + 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")); -- cgit v1.3