mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 07:36:56 +00:00
83f89be14a
The indicator scan lowercased the aura's name and icon on every aura of every unit, and SetupBuffIndicators lowercased the other side to match. Both sides come out of the same DBC records byte for byte, so the comparison already held without any of it: the aura's name and icon are Spell.dbc's localized name and SpellIcon.dbc's path (aura/Data.cpp fills one struct and emits it as either the AuraData table or the positional UnitAura tuple), and the indicator record reads those same two fields through C_Spell.GetSpellName / GetSpellTexture. So this was two string allocations per aura per scan to reach a result it already had -- and on Lua 5.0 that is an allocate-and-hash each time, since the VM interns even when the string exists. RefreshUnit runs this for every unit frame, which in a raid is 40 frames against up to 32 auras each. Checked every rank of all 65 indicator spells in Spell.dbc: name and icon are byte-identical across a spell's whole ladder, no case or spelling drift, so nothing depended on the fold. It also drops a crash path. aura/Data.cpp yields nil for the icon when a spell's SpellIconID is 0, and icon:lower() would have errored on that; name was guarded on the line above but icon never was. A raw compare is just false. The equality is now load-bearing, so AddIndicator's comment says to feed it spell ids and never a hand-written name or icon path -- a literal "interface\icons\foo" in that table would silently match nothing.