mirror of
https://github.com/Bluewhale1337/HealBotBlue.git
synced 2026-07-27 09:44:44 +00:00
perf: eliminate remaining GC spikes by preventing layout rebuilds on combat toggle and zeroing hot-loop table allocations
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
-- Handles tracking buffs/debuffs (auras) on group/raid units
|
-- Handles tracking buffs/debuffs (auras) on group/raid units
|
||||||
|
|
||||||
HealBot_MissingBuffs = {}
|
HealBot_MissingBuffs = {}
|
||||||
|
local StaticHasBuff = {}
|
||||||
|
|
||||||
function HealBot_UnitAffected(unit, effect)
|
function HealBot_UnitAffected(unit, effect)
|
||||||
if not effect then return nil; end
|
if not effect then return nil; end
|
||||||
@@ -68,7 +69,10 @@ function HealBot_CheckBuffs(unit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Gather buffs on unit
|
-- Gather buffs on unit
|
||||||
local hasBuff = {}
|
local hasBuff = StaticHasBuff
|
||||||
|
for k in pairs(hasBuff) do
|
||||||
|
hasBuff[k] = nil
|
||||||
|
end
|
||||||
local i = 1
|
local i = 1
|
||||||
while true do
|
while true do
|
||||||
local buffTexture = UnitBuff(unit, i)
|
local buffTexture = UnitBuff(unit, i)
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ function HealBot_OnUpdate(this, arg1)
|
|||||||
if not HealBot_IsFighting then
|
if not HealBot_IsFighting then
|
||||||
HealsIn_Timer = HealsIn_Timer + 1;
|
HealsIn_Timer = HealsIn_Timer + 1;
|
||||||
if HealsIn_Timer >= 10 then
|
if HealsIn_Timer >= 10 then
|
||||||
HealBot_HealsIn = {};
|
for k in pairs(HealBot_HealsIn) do HealBot_HealsIn[k] = nil end
|
||||||
HealBot_Healers = {};
|
for k in pairs(HealBot_Healers) do HealBot_Healers[k] = nil end
|
||||||
HealsIn_Timer = 0;
|
HealsIn_Timer = 0;
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -338,7 +338,7 @@ function HealBot_OnEvent_ZoneChanged(this)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function HealBot_OnEvent_PlayerRegenDisabled(this)
|
function HealBot_OnEvent_PlayerRegenDisabled(this)
|
||||||
HealBot_RecalcParty();
|
-- Removed HealBot_RecalcParty();
|
||||||
if (UnitIsDeadOrGhost("player")) or (UnitOnTaxi("player")) then
|
if (UnitIsDeadOrGhost("player")) or (UnitOnTaxi("player")) then
|
||||||
if HealBot_Config.AutoClose==1 and HealBot_Config.ActionVisible~=0 then
|
if HealBot_Config.AutoClose==1 and HealBot_Config.ActionVisible~=0 then
|
||||||
HealBot_Action.ProgrammaticHide = true;
|
HealBot_Action.ProgrammaticHide = true;
|
||||||
@@ -374,7 +374,7 @@ end
|
|||||||
|
|
||||||
function HealBot_OnEvent_PlayerRegenEnabled(this)
|
function HealBot_OnEvent_PlayerRegenEnabled(this)
|
||||||
HealBot_IsFighting = false;
|
HealBot_IsFighting = false;
|
||||||
HealBot_Delay_RecalcParty = 1;
|
-- Removed HealBot_Delay_RecalcParty = 1;
|
||||||
end
|
end
|
||||||
|
|
||||||
function HealBot_OnEvent_PlayerTargetChanged(this)
|
function HealBot_OnEvent_PlayerTargetChanged(this)
|
||||||
|
|||||||
Reference in New Issue
Block a user