From 3f35d0a0add5e0739c96b7632f91f5e7958b36ee Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Wed, 14 Jul 2021 17:45:04 -0400 Subject: [PATCH] Increase size of request hash table and yield instead of sleep after processing requests --- indra/llcommon/llqueuedthread.cpp | 4 ++-- indra/llcommon/llqueuedthread.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index 60156d7eb70..29c1d82d661 100644 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -464,7 +464,7 @@ S32 LLQueuedThread::processNextRequest() unlockData(); if (mThreaded && start_priority < PRIORITY_NORMAL) { - ms_sleep(1); // sleep the thread a little + yield(); } } @@ -511,7 +511,7 @@ void LLQueuedThread::run() if (pending_work == 0) { mIdleThread = true; - ms_sleep(1); + yield(); } //LLThread::yield(); // thread should yield after each request } diff --git a/indra/llcommon/llqueuedthread.h b/indra/llcommon/llqueuedthread.h index 7b76b90dc21..4ec8928f8b4 100644 --- a/indra/llcommon/llqueuedthread.h +++ b/indra/llcommon/llqueuedthread.h @@ -204,7 +204,7 @@ class LL_COMMON_API LLQueuedThread : public LLThread request_queue_t mRequestQueue; std::atomic<S32> mRequestQueueSize; - enum { REQUEST_HASH_SIZE = 512 }; // must be power of 2 + enum { REQUEST_HASH_SIZE = 1024 }; // must be power of 2 typedef LLSimpleHash<handle_t, REQUEST_HASH_SIZE> request_hash_t; request_hash_t mRequestHash; -- GitLab