Skip to content
Snippets Groups Projects
Commit 9a11a294 authored by Monty Brandenberg's avatar Monty Brandenberg
Browse files

Faster spin in worker thread when doing I/O and a priority bump needed when fixing priorities.

parent 3a9c182d
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,10 @@ ...@@ -38,6 +38,10 @@
#include "lltimer.h" #include "lltimer.h"
// Tuning parameters
static const int LOOP_SLEEP_NORMAL_MS = 10; // Normal per-loop sleep in milliseconds
namespace LLCore namespace LLCore
{ {
...@@ -198,7 +202,7 @@ void HttpService::threadRun(LLCoreInt::HttpThread * thread) ...@@ -198,7 +202,7 @@ void HttpService::threadRun(LLCoreInt::HttpThread * thread)
// Determine whether to spin, sleep briefly or sleep for next request // Determine whether to spin, sleep briefly or sleep for next request
if (REQUEST_SLEEP != loop) if (REQUEST_SLEEP != loop)
{ {
ms_sleep(50); ms_sleep(LOOP_SLEEP_NORMAL_MS);
} }
} }
......
...@@ -736,7 +736,7 @@ void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size) ...@@ -736,7 +736,7 @@ void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size)
if ((prioritize && mState == INIT) || mState == DONE) if ((prioritize && mState == INIT) || mState == DONE)
{ {
mState = INIT; mState = INIT;
U32 work_priority = mWorkPriority | LLWorkerThread::PRIORITY_LOW; U32 work_priority = mWorkPriority | LLWorkerThread::PRIORITY_HIGH;
setPriority(work_priority); setPriority(work_priority);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment