diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-08-13 18:45:50 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-08-14 00:31:37 -0400 |
commit | 6dbf1cafb20557722f30618e744e5ab61e9365fa (patch) | |
tree | 1b356e17a4f634455640f241dd4823b12864bd1d /indra/newview | |
parent | 2cff1e217ba0df94fc50a30c8d49dc848c294ac6 (diff) |
Reduce texture fetch and main thread contention from LLViewerStatsRecorder via simpleton.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewerstatsrecorder.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewerstatsrecorder.h | 9 |
4 files changed, 6 insertions, 16 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 36fe5a953f..ca7a300403 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1284,6 +1284,7 @@ bool LLAppViewer::init() //LLSimpleton creations LLEnvironment::createInstance(); LLWorld::createInstance(); + LLViewerStatsRecorder::createInstance(); LLSelectMgr::createInstance(); LLViewerCamera::createInstance(); LL::GLTFSceneManager::createInstance(); @@ -2166,6 +2167,7 @@ bool LLAppViewer::cleanup() LL::GLTFSceneManager::deleteSingleton(); LLEnvironment::deleteSingleton(); LLSelectMgr::deleteSingleton(); + LLViewerStatsRecorder::deleteSingleton(); LLViewerEventRecorder::deleteSingleton(); LLWorld::deleteSingleton(); LLVoiceClient::deleteSingleton(); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index b993ba16d5..7cefa21125 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1285,7 +1285,6 @@ bool idle_startup() // // Initialize classes w/graphics stuff. // - LLViewerStatsRecorder::instance(); // Since textures work in threads LLSurface::initClasses(); display_startup(); diff --git a/indra/newview/llviewerstatsrecorder.cpp b/indra/newview/llviewerstatsrecorder.cpp index 88edb96fbb..58065ecce5 100644 --- a/indra/newview/llviewerstatsrecorder.cpp +++ b/indra/newview/llviewerstatsrecorder.cpp @@ -27,16 +27,13 @@ #include "llviewerprecompiledheaders.h" #include "llviewerstatsrecorder.h" - #include "llcontrol.h" #include "llfile.h" +#include "llviewercontrol.h" #include "llviewerregion.h" #include "llviewerobject.h" #include "llworld.h" -extern LLControlGroup gSavedSettings; - -LLViewerStatsRecorder* LLViewerStatsRecorder::sInstance = NULL; LLViewerStatsRecorder::LLViewerStatsRecorder() : mStatsFile(NULL), mTimer(), @@ -48,11 +45,6 @@ LLViewerStatsRecorder::LLViewerStatsRecorder() : mMaxDuration(300.f), mSkipSaveIfZeros(false) { - if (NULL != sInstance) - { - LL_ERRS() << "Attempted to create multiple instances of LLViewerStatsRecorder!" << LL_ENDL; - } - sInstance = this; clearStats(); } diff --git a/indra/newview/llviewerstatsrecorder.h b/indra/newview/llviewerstatsrecorder.h index ecc321c0a8..2108f49dc3 100644 --- a/indra/newview/llviewerstatsrecorder.h +++ b/indra/newview/llviewerstatsrecorder.h @@ -38,13 +38,12 @@ class LLMutex; class LLViewerObject; -class LLViewerStatsRecorder : public LLSingleton<LLViewerStatsRecorder> +class LLViewerStatsRecorder : public LLSimpleton<LLViewerStatsRecorder> { - LLSINGLETON(LLViewerStatsRecorder); +public: + LLViewerStatsRecorder(); LOG_CLASS(LLViewerStatsRecorder); ~LLViewerStatsRecorder(); - - public: // Enable/disable stats recording. This is broken down into two // flags so we can record stats without writing them to the log // file. This is useful to analyzing updates for scene loading. @@ -140,8 +139,6 @@ private: void closeStatsFile(); void makeStatsFileName(); - static LLViewerStatsRecorder* sInstance; - LLFILE * mStatsFile; // File to write data into std::string mStatsFileName; |