performance: category caching

This commit is contained in:
Salikh Gurgenidze
2026-01-23 22:33:42 +04:00
parent 2263fd53c6
commit 473540299e
2 changed files with 65 additions and 2 deletions
+10
View File
@@ -166,6 +166,12 @@ function Main:SetupSlashCommands()
else
addon:Print("Performance stats not available")
end
-- Also show category cache stats
if addon.Modules.CategoryManager and addon.Modules.CategoryManager.GetCacheStats then
local stats = addon.Modules.CategoryManager:GetCacheStats()
addon:Print("Category Cache: %d hits, %d misses (%.1f%% hit rate)",
stats.hits, stats.misses, stats.hitRate)
end
elseif msg == "perfreset" then
-- Reset performance statistics
@@ -173,6 +179,10 @@ function Main:SetupSlashCommands()
addon.Modules.Utils:ResetPerformanceStats()
addon:Print("Performance stats reset")
end
-- Also clear category cache
if addon.Modules.CategoryManager and addon.Modules.CategoryManager.ClearCache then
addon.Modules.CategoryManager:ClearCache()
end
elseif msg == "help" then
-- Show help