From db68b4d7ea42c176bb0d4a25220ffb56bfd52a5f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 10 Jun 2014 22:26:46 +0200 Subject: [PATCH] Re-apply performance tweak in LLFlashTimer --- indra/llui/llflashtimer.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/llui/llflashtimer.cpp b/indra/llui/llflashtimer.cpp index 9273695dd6..9cc00510a1 100755 --- a/indra/llui/llflashtimer.cpp +++ b/indra/llui/llflashtimer.cpp @@ -40,10 +40,18 @@ LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period) // By default use settings from settings.xml to be able change them via Debug settings. See EXT-5973. // Due to Timer is implemented as derived class from EventTimer it is impossible to change period // in runtime. So, both settings are made as required restart. - mFlashCount = 2 * ((count > 0) ? count : LLUI::sSettingGroups["config"]->getS32("FlashCount")); + // + //mFlashCount = 2 * ((count > 0) ? count : LLUI::sSettingGroups["config"]->getS32("FlashCount")); + static LLCachedControl flash_count(*LLUI::sSettingGroups["config"], "FlashCount"); + mFlashCount = 2 * ((count > 0) ? count : flash_count); + // if (mPeriod <= 0) { - mPeriod = LLUI::sSettingGroups["config"]->getF32("FlashPeriod"); + //mPeriod = LLUI::sSettingGroups["config"]->getF32("FlashPeriod"); + // + static LLCachedControl flash_period(*LLUI::sSettingGroups["config"], "FlashPeriod"); + mPeriod = flash_period; + // } // Configurable at runtime