diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index ff50b19d221a3253266e6c01654eccb1cb9ec346..5dab1cc4d0c7b1faf691400c0c08136afa0a9b73 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -431,7 +431,7 @@ void LLAvatarActions::showPick(const LLUUID& avatar_id, const LLUUID& pick_id)
         {
             const LLFloaterProfileLegacy* profile = LLFloaterReg::showTypedInstance<LLFloaterProfileLegacy>(
                 "legacy_profile", LLSD().with("avatar_id", avatar_id), TAKE_FOCUS_YES);
-            auto* tab = dynamic_cast<LLPanelProfileLegacy::LLPanelProfilePicks*>(profile->expandTab("avatar_picks_tab"));
+            /*auto* tab = */dynamic_cast<LLPanelProfileLegacy::LLPanelProfilePicks*>(profile->expandTab("avatar_picks_tab"));
 			// *TODO: Finish
         }
         else
@@ -477,7 +477,8 @@ bool LLAvatarActions::isPickTabSelected(const LLUUID& avatar_id)
 {
     if (avatar_id.notNull())
     {
-        if (gSkinSettings.getBool("LegacyProfile"))
+		static LLCachedControl<bool> legacy_profile(gSkinSettings, "LegacyProfile");
+        if (legacy_profile)
         {
             const LLFloaterProfileLegacy* profile = LLFloaterReg::findTypedInstance<LLFloaterProfileLegacy>(
 				"legacy_profile", LLSD().with("avatar_id", avatar_id));
@@ -578,7 +579,8 @@ bool LLAvatarActions::profileVisible(const LLUUID& avatar_id)
 LLFloater* LLAvatarActions::findProfileFloater(const LLUUID& avatar_id)
 {
     LLFloater* profile = nullptr;
-    if (gSkinSettings.getBool("LegacyProfile"))
+	static LLCachedControl<bool> legacy_profile(gSkinSettings, "LegacyProfile");
+    if (legacy_profile)
         profile = LLFloaterReg::findTypedInstance<LLFloaterProfileLegacy>("legacy_profile", LLSD().with("avatar_id", avatar_id));
     else
         profile = LLFloaterReg::findTypedInstance<LLFloaterProfile>("profile", LLSD().with("id", avatar_id));
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 16af560bcee45e93ba43199728c2808cba70c7f3..a65cd28611ccca0e4a90a8cce61ed19749090b69 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -474,6 +474,7 @@ void LLDrawPoolWater::renderWater()
     LLColor3 light_diffuse(0, 0, 0);
 //    F32      light_exp = 0.0f;
 
+	static LLCachedControl<bool> has_normal_mips(gSavedSettings, "RenderWaterMipNormal");
 	LLEnvironment& environment = LLEnvironment::instance();
 	LLViewerCamera& viewerCamera = LLViewerCamera::instance();
 	const LLSettingsWater::ptr_t& pwater = environment.getCurrentWater();
@@ -481,7 +482,6 @@ void LLDrawPoolWater::renderWater()
     LLVector3              light_dir       = environment.getLightDirection();
     bool                   sun_up          = environment.getIsSunUp();
     bool                   moon_up         = environment.getIsMoonUp();
-    bool                   has_normal_mips = gSavedSettings.getBOOL("RenderWaterMipNormal");
     bool                   underwater      = viewerCamera.cameraUnderWater();
 
     if (sun_up)