Optimize frame tick code.

Mere [07-27-13 - 13:25]
Optimize frame tick code.

The main change is to not update buff/debuff timer text on *every* tick.  Only do it when it actually changes (once a minute or second)

There are also one or two really really small tweaks.

Also fix bug with reseting the HotIcon properties, if it has frames loaded, mark the icon as having frames loaded, fixes issue of icons not appearing when reconfiguring them.
Filename
BuffManager.lua
HotIcon.lua
diff --git a/BuffManager.lua b/BuffManager.lua
index 7931155..cad8434 100644
--- a/BuffManager.lua
+++ b/BuffManager.lua
@@ -22,9 +22,7 @@ local function FrameTick()
     MereHealingFrames.Events.BumpEventCounter("Event.System.Update.Begin")
     local currentTime = InspectTimeFrame()
     for tracker, value in pairs(TickingTrackers) do
-        if value then
-            tracker:Tick(currentTime)
-        end
+        tracker:Tick(currentTime)
     end
 end

diff --git a/HotIcon.lua b/HotIcon.lua
index 8ed5a8c..b0a105d 100644
--- a/HotIcon.lua
+++ b/HotIcon.lua
@@ -39,7 +39,7 @@ MereHealingFrames.HotIcon = {
 	DeBuff = nil,
 	OnlyMySpells = true,
 	CounterSize = nil,
-	TimerLeft = nil,
+	TimerLeft = -1,
 	BuffSlot = 0,
     framesLoaded = false,
     LayoutOffset = 0,
@@ -137,9 +137,11 @@ end

 function MereHealingFrames.HotIcon:Reset()
 	self:SetVisible(false)
+    local framesLoaded = self.framesLoaded
     for key, value in pairs(MereHealingFrames.HotIcon) do
         self[key] = nil
     end
+    self.framesLoaded = framesLoaded
 	self.ParentFrame = MereHealingFrames.context
 end

@@ -173,22 +175,32 @@ function MereHealingFrames.HotIcon:UpdateTimer(TimeLeft)
 	end

 	--self.Timer:SetAlpha(1)
-
+    MereHealingFrames.Debug(9, "HotIcon Timer: %d", TimeLeft)
+
+    local isInMinutes
+    if (TimeLeft > 60) then
+        TimeLeft = mathFloor(TimeLeft / 60)
+        isInMinutes = true
+    else
+        TimeLeft = mathFloor(TimeLeft)
+        isInMinutes = false
+    end
+
 	local timeString
-	TimeLeft = mathFloor(TimeLeft)
-	MereHealingFrames.Debug(9, "HotIcon Timer: %s", tostring(TimeLeft))
-
+
 	if self.TimerLeft == TimeLeft then
 		return
-	end
+    end
+    self.TimerLeft = TimeLeft

-	if (TimeLeft > 60) then
-		timeString = stringFormat("%dm", mathFloor(TimeLeft / 60))
+	if (isInMinutes) then
+		timeString = stringFormat("%dm", TimeLeft)
 	else
 		timeString = stringFormat("%ds", TimeLeft)
 	end
 	MereHealingFrames.Debug(9, "HotIcon Timer: %s", timeString)
-	self.Timer:SetText(timeString)
+
+ 	self.Timer:SetText(timeString)
 end

 function MereHealingFrames.HotIcon:UpdateCounter(counterSize)