From 2b22097d1cee4885c8e1c6526e64bf8213f3067f Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 19 Mar 2020 21:26:34 -0400 Subject: [PATCH] Fix constant reallocation of texture fetch command queue because...who..uses a vector..for a fifo... --- indra/newview/lltexturefetch.cpp | 2 +- indra/newview/lltexturefetch.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index fe058024f69..485d3fc8780 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -3946,7 +3946,7 @@ LLTextureFetch::TFRequest * LLTextureFetch::cmdDequeue() if (! mCommands.empty()) { ret = mCommands.front(); - mCommands.erase(mCommands.begin()); + mCommands.pop_front(); } unlockQueue(); // -Mfq diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index cdf88685970..f9b0855d5ea 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -347,7 +347,7 @@ class LLTextureFetch : public LLWorkerThread // is logically tied to LLQueuedThread's list of // QueuedRequest instances and so must be covered by the // same locks. - typedef std::vector<TFRequest *> command_queue_t; + typedef std::deque<TFRequest *> command_queue_t; command_queue_t mCommands; // Mfq // If true, modifies some behaviors that help with QA tasks. -- GitLab