perf: eliminate remaining GC spikes by preventing layout rebuilds on combat toggle and zeroing hot-loop table allocations

This commit is contained in:
Bluewhale1337
2026-07-18 23:43:35 +02:00
parent 9f08b356e1
commit e6ad9e7506
2 changed files with 9 additions and 5 deletions
+5 -1
View File
@@ -2,6 +2,7 @@
-- Handles tracking buffs/debuffs (auras) on group/raid units
HealBot_MissingBuffs = {}
local StaticHasBuff = {}
function HealBot_UnitAffected(unit, effect)
if not effect then return nil; end
@@ -68,7 +69,10 @@ function HealBot_CheckBuffs(unit)
}
-- Gather buffs on unit
local hasBuff = {}
local hasBuff = StaticHasBuff
for k in pairs(hasBuff) do
hasBuff[k] = nil
end
local i = 1
while true do
local buffTexture = UnitBuff(unit, i)
+4 -4
View File
@@ -85,8 +85,8 @@ function HealBot_OnUpdate(this, arg1)
if not HealBot_IsFighting then
HealsIn_Timer = HealsIn_Timer + 1;
if HealsIn_Timer >= 10 then
HealBot_HealsIn = {};
HealBot_Healers = {};
for k in pairs(HealBot_HealsIn) do HealBot_HealsIn[k] = nil end
for k in pairs(HealBot_Healers) do HealBot_Healers[k] = nil end
HealsIn_Timer = 0;
end
@@ -338,7 +338,7 @@ function HealBot_OnEvent_ZoneChanged(this)
end
function HealBot_OnEvent_PlayerRegenDisabled(this)
HealBot_RecalcParty();
-- Removed HealBot_RecalcParty();
if (UnitIsDeadOrGhost("player")) or (UnitOnTaxi("player")) then
if HealBot_Config.AutoClose==1 and HealBot_Config.ActionVisible~=0 then
HealBot_Action.ProgrammaticHide = true;
@@ -374,7 +374,7 @@ end
function HealBot_OnEvent_PlayerRegenEnabled(this)
HealBot_IsFighting = false;
HealBot_Delay_RecalcParty = 1;
-- Removed HealBot_Delay_RecalcParty = 1;
end
function HealBot_OnEvent_PlayerTargetChanged(this)