diff --git a/libs/libpredict.lua b/libs/libpredict.lua index 448876c8..77701f0b 100644 --- a/libs/libpredict.lua +++ b/libs/libpredict.lua @@ -96,6 +96,10 @@ libpredict:SetScript("OnEvent", function() end) libpredict:SetScript("OnUpdate", function() + -- throttle cleanup to 0.1s - no need to check every frame + if (this.tick or 0) > GetTime() then return end + this.tick = GetTime() + 0.1 + -- update on timeout events for timestamp, targets in pairs(events) do if GetTime() >= timestamp then