From 2fe5603e6e655b17d42a0206225078fb9a61a5bb Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Wed, 31 Dec 2025 12:22:09 +0100 Subject: [PATCH] performance updates performance updates --- libs/libpredict.lua | 4 ++++ 1 file changed, 4 insertions(+) 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