From abc59b99dd43d92151edaf306a2e086b9b4b98bf Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Mon, 24 Aug 2026 22:39:00 +0200 Subject: [PATCH] Throttle world map coordinate updates --- mods/worldmap-coordinates.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mods/worldmap-coordinates.lua b/mods/worldmap-coordinates.lua index 35a3ee7..bbfd557 100644 --- a/mods/worldmap-coordinates.lua +++ b/mods/worldmap-coordinates.lua @@ -41,7 +41,15 @@ module.enable = function(self) WorldMapButton.player.text:SetTextColor(1, 1, 1) WorldMapButton.player.text:SetJustifyH("RIGHT") + WorldMapButton.coords.elapsed = 0 WorldMapButton.coords:SetScript("OnUpdate", function() + -- Coordinates do not need a full render-frame refresh. 10 Hz keeps the + -- display responsive while avoiding repeated map/cursor queries and + -- string formatting on every frame while the world map is open. + this.elapsed = (this.elapsed or 0) + arg1 + if this.elapsed < .1 then return end + this.elapsed = 0 + local width = WorldMapButton:GetWidth() local height = WorldMapButton:GetHeight() local mx, my = WorldMapButton:GetCenter()