added a 100fps throttle for nameplates internally

This commit is contained in:
Meow
2026-03-21 13:31:01 +01:00
parent 9a4fef71ff
commit f6d0cf7ba1
+6 -1
View File
@@ -574,8 +574,13 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA")
end)
nameplates:SetScript("OnUpdate", function()
-- PERF: Throttle central OnUpdate to ~100 FPS (0.01s)
local now = GetTime()
if (this.frameTick or 0) + 0.01 > now then return end
this.frameTick = now
-- PERF: Cache GetTime() once per frame
frameState.now = GetTime()
frameState.now = now
frameState.hasTarget, frameState.targetGuid = UnitExists("target")
frameState.hasMouseover = UnitExists("mouseover")