performance: tooltip caching

This commit is contained in:
Salikh Gurgenidze
2026-01-23 22:43:48 +04:00
parent 473540299e
commit 122ee5992e
2 changed files with 170 additions and 13 deletions
+10
View File
@@ -172,6 +172,12 @@ function Main:SetupSlashCommands()
addon:Print("Category Cache: %d hits, %d misses (%.1f%% hit rate)",
stats.hits, stats.misses, stats.hitRate)
end
-- Show tooltip cache stats
if addon.Modules.Utils and addon.Modules.Utils.GetTooltipCacheStats then
local stats = addon.Modules.Utils:GetTooltipCacheStats()
addon:Print("Tooltip Cache: %d hits, %d misses (%.1f%% hit rate)",
stats.hits, stats.misses, stats.hitRate)
end
elseif msg == "perfreset" then
-- Reset performance statistics
@@ -183,6 +189,10 @@ function Main:SetupSlashCommands()
if addon.Modules.CategoryManager and addon.Modules.CategoryManager.ClearCache then
addon.Modules.CategoryManager:ClearCache()
end
-- Clear tooltip cache
if addon.Modules.Utils and addon.Modules.Utils.ClearTooltipCache then
addon.Modules.Utils:ClearTooltipCache()
end
elseif msg == "help" then
-- Show help