diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index c8af7447dd40a6347bd55f543cc84edc822eaf97..9807f1baa82fa7f2f5246f536c7bf590dc03bb7f 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -627,7 +627,7 @@ void LLButton::getOverlayImageSize(S32& overlay_width, S32& overlay_height)
 // virtual
 void LLButton::draw()
 {
-	static LLCachedControl<bool> sEnableButtonFlashing(*LLUI::getInstance()->mSettingGroups["config"], "EnableButtonFlashing", true);
+	static const LLUICachedControl<bool> sEnableButtonFlashing("EnableButtonFlashing", true);
 	F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency();
 
 	bool pressed_by_keyboard = FALSE;
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 1816cb8e1a7d06308140467d5b0eb3a0c985739b..c336966f22973eeb114f4c80819b9d549ce9cf77 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -384,14 +384,14 @@ void LLFloater::layoutDragHandle()
 // static
 void LLFloater::updateActiveFloaterTransparency()
 {
-    static LLCachedControl<F32> active_transparency(*LLUI::getInstance()->mSettingGroups["config"], "ActiveFloaterTransparency", 1.f);
+    static LLUICachedControl<F32> active_transparency("ActiveFloaterTransparency", 1.f);
     sActiveControlTransparency = active_transparency;
 }
 
 // static
 void LLFloater::updateInactiveFloaterTransparency()
 {
-    static LLCachedControl<F32> inactive_transparency(*LLUI::getInstance()->mSettingGroups["config"], "InactiveFloaterTransparency", 0.95f);
+    static LLUICachedControl<F32> inactive_transparency("InactiveFloaterTransparency", 0.95f);
     sInactiveControlTransparency = inactive_transparency;
 }
 
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index ffe3fba72f7ff8d0d7929c0e04ada4050ee56eaa..c26a0195b5066d4e2f36669f07fca411ff6f9b41 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -433,7 +433,7 @@ class LLCachedControl
 
 	operator const T&() const { return mCachedControlPtr->getValue(); }
 	operator boost::function<const T&()> () const { return boost::function<const T&()>(*this); }
-	const T& operator()() { return mCachedControlPtr->getValue(); }
+	const T& operator()() const { return mCachedControlPtr->getValue(); }
 
 private:
 	LLPointer<LLControlCache<T> > mCachedControlPtr;
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 5978e697c84a557e9a6ab7b907e7dece4a03b7a3..8c6ec08d660a5fab480a7d1041a3f59021d01a7d 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -585,9 +585,9 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
 
 LLColor4 LLManip::setupSnapGuideRenderPass(S32 pass)
 {
-	static LLColor4 grid_color_fg = LLUIColorTable::instance().getColor("GridlineColor");
-	static LLColor4 grid_color_bg = LLUIColorTable::instance().getColor("GridlineBGColor");
-	static LLColor4 grid_color_shadow = LLUIColorTable::instance().getColor("GridlineShadowColor");
+	static LLUIColor grid_color_fg = LLUIColorTable::instance().getColor("GridlineColor");
+	static LLUIColor grid_color_bg = LLUIColorTable::instance().getColor("GridlineBGColor");
+	static LLUIColor grid_color_shadow = LLUIColorTable::instance().getColor("GridlineShadowColor");
 
 	LLColor4 line_color;
 	F32 line_alpha = ALControlCache::GridOpacity;
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 50afb4dd56984bd1a98d434f821b72ee9a2f147d..35b77d9c3e4fb8aaabd7a2461b25d14b244cfebe 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -690,10 +690,12 @@ void LLOutfitGalleryItem::draw()
     LLPanel::draw();
     
     // Draw border
-    LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "OutfitGalleryItemSelected" : "OutfitGalleryItemUnselected", LLColor4::white);
+    static LLUIColor selected_color = LLUIColorTable::instance().getColor("OutfitGalleryItemSelected", LLColor4::white);
+    static LLUIColor unselected_color = LLUIColorTable::instance().getColor("OutfitGalleryItemUnselected", LLColor4::white);
+    const LLColor4& border_color = mSelected ? selected_color : unselected_color;
     LLRect border = getChildView("preview_outfit")->getRect();
     border.mRight = border.mRight + 1;
-    gl_rect_2d(border, border_color.get(), FALSE);
+    gl_rect_2d(border, border_color, FALSE);
 
     // If the floater is focused, don't apply its alpha to the texture (STORM-677).
     const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 8188adad295b6a82f822c1ecee7c5afdbc66df3c..7d0afaebed0c1cd516a9ff75d3d460c2ea0a3826 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -364,8 +364,8 @@ void LLSpeakerMgr::update(BOOL resort_ok)
 		return;
 	}
 	
-	LLColor4 speaking_color = LLUIColorTable::instance().getColor("SpeakingColor");
-	LLColor4 overdriven_color = LLUIColorTable::instance().getColor("OverdrivenColor");
+	static const LLUIColor speaking_color = LLUIColorTable::instance().getColor("SpeakingColor");
+	static const LLUIColor overdriven_color = LLUIColorTable::instance().getColor("OverdrivenColor");
 
 	if(resort_ok) // only allow list changes when user is not interacting with it
 	{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f8270be7394ee6d3ce7627221072041f6c44a07e..0742c682db8c30f0364f8251296b513f44f32183 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3546,11 +3546,25 @@ void LLVOAvatar::idleUpdateNameTagAlpha(BOOL new_name, F32 alpha)
 
 LLColor4 LLVOAvatar::getNameTagColor(bool is_friend)
 {
+	enum ENameColor { NameTagFriend = 0, NameTagMatch, NameTagMismatch, NameTagLegacy, Size};
+	static std::vector<LLUIColor> sNameTagColors;
+	if (sNameTagColors.empty())
+	{
+		sNameTagColors.reserve(ENameColor::Size);
+
+		auto& inst = LLUIColorTable::instance();
+		sNameTagColors[NameTagFriend] = inst.getColor("NameTagFriend");
+		sNameTagColors[NameTagMatch] = inst.getColor("NameTagMatch");
+		sNameTagColors[NameTagMismatch] = inst.getColor("NameTagMismatch");
+		sNameTagColors[NameTagLegacy] = inst.getColor("NameTagLegacy");
+	}
+
 	static LLUICachedControl<bool> show_friends("NameTagShowFriends", false);
-	const char* color_name;
+	ENameColor color_name;
 	if (show_friends && is_friend)
 	{
-		color_name = "NameTagFriend";
+
+		color_name = ENameColor::NameTagFriend;
 	}
 	else if (LLAvatarName::useDisplayNames())
 	{
@@ -3558,19 +3572,19 @@ LLColor4 LLVOAvatar::getNameTagColor(bool is_friend)
 		LLAvatarName av_name;
 		if (LLAvatarNameCache::get(getID(), &av_name) && av_name.isDisplayNameDefault())
 		{
-			color_name = "NameTagMatch";
+			color_name = ENameColor::NameTagMatch;
 		}
 		else
 		{
-			color_name = "NameTagMismatch";
+			color_name = ENameColor::NameTagMismatch;
 		}
 	}
 	else
 	{
 		// ...not using display names
-		color_name = "NameTagLegacy";
+		color_name = ENameColor::NameTagLegacy;
 	}
-	return LLUIColorTable::getInstance()->getColor( color_name );
+	return sNameTagColors[color_name];
 }
 
 void LLVOAvatar::idleUpdateBelowWater()