1 Commits

Author SHA1 Message Date
Bluewhale1337 4e8d5d8426 Merge pull request #20 from Bluewhale1337/dev
Dev
2026-09-13 12:58:54 +02:00
8 changed files with 9 additions and 21 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
## Interface: 11200 ## Interface: 11200
## Title: HealBotBlue ## Title: HealBotBlue
## Version: 1.7.3 ## Version: 1.7.2
## Author: Bluewhale ## Author: Bluewhale
## Notes: Raidframe replacement for healing, decursing, resource tracking and buffing with optional support for SuperWow, ClassicAPI, UnitXP_SP3 and Nampower. ## Notes: Raidframe replacement for healing, decursing, resource tracking and buffing with optional support for SuperWow, ClassicAPI, UnitXP_SP3 and Nampower.
## SavedVariablesPerCharacter: HealBot_Config ## SavedVariablesPerCharacter: HealBot_Config
+2 -4
View File
@@ -136,10 +136,9 @@ end
-- HealBot_SplitString: Internal utility: HealBot_SplitString -- HealBot_SplitString: Internal utility: HealBot_SplitString
function HealBot_SplitString(str, delimiter) function HealBot_SplitString(str, delimiter)
local result = HealBot_GetTable() local result = {}
if not delimiter or delimiter == "" then if not delimiter or delimiter == "" then
table.insert(result, str) return {str}
return result
end end
local start_pos = 1 local start_pos = 1
while true do while true do
@@ -161,7 +160,6 @@ function HealBot_RunMacroText(body)
ChatFrameEditBox:SetText(commands[i]) ChatFrameEditBox:SetText(commands[i])
ChatEdit_SendText(ChatFrameEditBox) ChatEdit_SendText(ChatFrameEditBox)
end end
HealBot_ReleaseTable(commands)
end end
-- HealBot_RunMacro: Internal utility: HealBot_RunMacro -- HealBot_RunMacro: Internal utility: HealBot_RunMacro
+1 -2
View File
@@ -184,7 +184,7 @@ function HealBot_OnEvent_UnitAura(this, unit)
local iconCount = 0 local iconCount = 0
local i = 1; local i = 1;
HealBot_UnitDebuff[unit] = nil; HealBot_UnitDebuff[unit] = nil;
local trackedTextures = HealBot_GetTable() local trackedTextures = {}
while true do while true do
local debuff, tmp, debuff_type = UnitDebuff(unit, i, 1) local debuff, tmp, debuff_type = UnitDebuff(unit, i, 1)
@@ -301,6 +301,5 @@ function HealBot_OnEvent_UnitAura(this, unit)
-- Defer UI updates -- Defer UI updates
HealBot_View_DirtyUnits[unit] = true HealBot_View_DirtyUnits[unit] = true
HealBot_ReleaseTable(trackedTextures)
end end
end end
+1 -2
View File
@@ -472,7 +472,7 @@ function HealBot_FindHealSpells()
end end
end); end);
local items = HealBot_GetTable(); local items = {};
for bag = 0, NUM_BAG_FRAMES do for bag = 0, NUM_BAG_FRAMES do
for slot = 1, GetContainerNumSlots(bag) do for slot = 1, GetContainerNumSlots(bag) do
local item = HealBot_GetItemName(bag, slot); local item = HealBot_GetItemName(bag, slot);
@@ -498,7 +498,6 @@ function HealBot_FindHealSpells()
HealBot_Heals["raidpet" .. i] = HealBot_Heals.party; HealBot_Heals["raidpet" .. i] = HealBot_Heals.party;
end end
HealBot_ReleaseTable(items);
if HealBot_CalcEquipBonus then if HealBot_CalcEquipBonus then
HealBot_AddDebug("...Done Equip Bonus:" .. RealHealing); HealBot_AddDebug("...Done Equip Bonus:" .. RealHealing);
end end
+2 -5
View File
@@ -44,7 +44,7 @@ function HealBot_Integrations_Toggle()
if not spellName then return end if not spellName then return end
if not HealBot_Nampower_Auras[target] then if not HealBot_Nampower_Auras[target] then
HealBot_Nampower_Auras[target] = HealBot_GetTable() HealBot_Nampower_Auras[target] = {}
end end
local expirationTime = GetTime() + (duration / 1000) local expirationTime = GetTime() + (duration / 1000)
@@ -61,8 +61,7 @@ function HealBot_Integrations_Toggle()
HealBot_Integrations_Nampower_Active = false; HealBot_Integrations_Nampower_Active = false;
HealBot_AddDebug("nampower Integration: DISABLED"); HealBot_AddDebug("nampower Integration: DISABLED");
if HealBot_Nampower_Auras then if HealBot_Nampower_Auras then
for k, v in pairs(HealBot_Nampower_Auras) do for k in pairs(HealBot_Nampower_Auras) do
HealBot_ReleaseTable(v)
HealBot_Nampower_Auras[k] = nil HealBot_Nampower_Auras[k] = nil
end end
end end
@@ -77,7 +76,6 @@ function HealBot_Integrations_PruneNampower()
for targetName, auras in pairs(HealBot_Nampower_Auras) do for targetName, auras in pairs(HealBot_Nampower_Auras) do
-- Check if target is still in the raid/party -- Check if target is still in the raid/party
if not HealBot_Model:GetUnitIDByName(targetName) then if not HealBot_Model:GetUnitIDByName(targetName) then
HealBot_ReleaseTable(auras)
HealBot_Nampower_Auras[targetName] = nil HealBot_Nampower_Auras[targetName] = nil
else else
-- Prune expired auras -- Prune expired auras
@@ -90,7 +88,6 @@ function HealBot_Integrations_PruneNampower()
end end
end end
if not hasAuras then if not hasAuras then
HealBot_ReleaseTable(auras)
HealBot_Nampower_Auras[targetName] = nil HealBot_Nampower_Auras[targetName] = nil
end end
end end
+1 -2
View File
@@ -245,8 +245,7 @@ function HealBot_Model:PreserveStateByGUID()
for targetUnit, stateData in pairs(stateSwaps) do for targetUnit, stateData in pairs(stateSwaps) do
-- Deep copy to prevent memory aliasing -- Deep copy to prevent memory aliasing
if not self.units[targetUnit] then if not self.units[targetUnit] then
self.units[targetUnit] = HealBot_GetTable() self.units[targetUnit] = { icons = {} }
self.units[targetUnit].icons = HealBot_GetTable()
end end
local targetIcons = self.units[targetUnit].icons local targetIcons = self.units[targetUnit].icons
+1 -2
View File
@@ -1153,7 +1153,7 @@ end
function HealBot_Action_AppendNewUnits() function HealBot_Action_AppendNewUnits()
if not HealBot_Grid_LastI then return end if not HealBot_Grid_LastI then return end
local unitsToCheck = HealBot_GetTable() local unitsToCheck = {}
-- Gather units based on config, similar to PartyChanged -- Gather units based on config, similar to PartyChanged
if HealBot_Config.GroupHeals == 1 then if HealBot_Config.GroupHeals == 1 then
@@ -1220,5 +1220,4 @@ function HealBot_Action_AppendNewUnits()
HealBot_Action_AppendUnit(unit) HealBot_Action_AppendUnit(unit)
end end
end end
HealBot_ReleaseTable(unitsToCheck)
end end
-3
View File
@@ -49,9 +49,6 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
### Change Log ### Change Log
**v1.7.3**
* **Performance Fix - Table Pooling Part 2** - Fixed remaining un-pooled table allocations in layout updates, macro parsing, nampower integration, and aura tracking by utilizing HealBot_GetTable().
**v1.7.2** **v1.7.2**
* **Performance Fix - Table Pooling** - Fixed massive Vanilla Lua 5.0 garbage collection memory leaks caused by unbounded table allocations in high-frequency update loops (e.g., `OnUpdate` and `PreserveStateByGUID`). Moved tables to file-local scope and implemented inline clearing. * **Performance Fix - Table Pooling** - Fixed massive Vanilla Lua 5.0 garbage collection memory leaks caused by unbounded table allocations in high-frequency update loops (e.g., `OnUpdate` and `PreserveStateByGUID`). Moved tables to file-local scope and implemented inline clearing.
* **Performance Fix - OOC Cleanup** - Added an out-of-combat garbage collection hook (`PLAYER_REGEN_ENABLED`) to purge disconnected senders from the `HealBot_IncomingHealers` global table, preventing memory bloat during prolonged play sessions. * **Performance Fix - OOC Cleanup** - Added an out-of-combat garbage collection hook (`PLAYER_REGEN_ENABLED`) to purge disconnected senders from the `HealBot_IncomingHealers` global table, preventing memory bloat during prolonged play sessions.