Converted frequently occuring setting lookups to LLCachedControl

Added LLObjectList::getAvatar(LLUUID) for type-safe and quicker lookup
Added F32 overload to LLSD because using F64 needlessly is silly.
   (And its lack of F32 overload caused issues with LLCachedControl<F32>)
This commit is contained in:
unknown
2010-10-07 21:36:13 -05:00
parent 49e4959bf5
commit fe9a3d2ba2
41 changed files with 365 additions and 209 deletions

View File

@@ -1020,7 +1020,7 @@ bool LLAppViewer::mainLoop()
// Sleep and run background threads
{
LLFastTimer t2(LLFastTimer::FTM_SLEEP);
bool run_multiple_threads = gSavedSettings.getBOOL("RunMultipleThreads");
static LLCachedControl<bool> run_multiple_threads("RunMultipleThreads",false);
// yield some time to the os based on command line option
if(mYieldTime >= 0)
@@ -4077,7 +4077,8 @@ void LLAppViewer::resumeMainloopTimeout(const std::string& state, F32 secs)
{
if(secs < 0.0f)
{
secs = gSavedSettings.getF32("MainloopTimeoutDefault");
static LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
secs = mainloop_timeout_default;
}
mMainloopTimeout->setTimeout(secs);
@@ -4104,7 +4105,8 @@ void LLAppViewer::pingMainloopTimeout(const std::string& state, F32 secs)
{
if(secs < 0.0f)
{
secs = gSavedSettings.getF32("MainloopTimeoutDefault");
static LLCachedControl<F32> mainloop_timeout_default("ThrottleBandwidthKBPS",20);
secs = mainloop_timeout_default;
}
mMainloopTimeout->setTimeout(secs);