Skip to content
Snippets Groups Projects
Commit 3f35d0a0 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Increase size of request hash table and yield instead of sleep after processing requests

parent f4d54add
Branches
Tags
No related merge requests found
...@@ -464,7 +464,7 @@ S32 LLQueuedThread::processNextRequest() ...@@ -464,7 +464,7 @@ S32 LLQueuedThread::processNextRequest()
unlockData(); unlockData();
if (mThreaded && start_priority < PRIORITY_NORMAL) if (mThreaded && start_priority < PRIORITY_NORMAL)
{ {
ms_sleep(1); // sleep the thread a little yield();
} }
} }
...@@ -511,7 +511,7 @@ void LLQueuedThread::run() ...@@ -511,7 +511,7 @@ void LLQueuedThread::run()
if (pending_work == 0) if (pending_work == 0)
{ {
mIdleThread = true; mIdleThread = true;
ms_sleep(1); yield();
} }
//LLThread::yield(); // thread should yield after each request //LLThread::yield(); // thread should yield after each request
} }
......
...@@ -204,7 +204,7 @@ class LL_COMMON_API LLQueuedThread : public LLThread ...@@ -204,7 +204,7 @@ class LL_COMMON_API LLQueuedThread : public LLThread
request_queue_t mRequestQueue; request_queue_t mRequestQueue;
std::atomic<S32> mRequestQueueSize; 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; typedef LLSimpleHash<handle_t, REQUEST_HASH_SIZE> request_hash_t;
request_hash_t mRequestHash; request_hash_t mRequestHash;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment