Skip to content

Commit

Permalink
Improved item name caching performance
Browse files Browse the repository at this point in the history
This mostly affects Classic Era.
  • Loading branch information
Anonomit committed Dec 10, 2023
1 parent 14fefe4 commit 08815ab
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 60 deletions.
109 changes: 51 additions & 58 deletions ItemSearch.lua

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Windows/ServerImportWindow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ function LootReserve.Server.Import:SessionSettingsUpdated()
self.PendingInputOptionsUpdate = true;
C_Timer.After(0.1, function()
self.PendingInputOptionsUpdate = false;
self:InputOptionsUpdated();
if LootReserveServerImportWindow:IsShown() then
self:InputOptionsUpdated();
end
end);
end
return format("Creating item name database... (%d%%)|n|nInstall/Update ItemCache to remember the item database between sessions", LootReserve.ItemSearch.FullCache:GetProgress(0));
Expand Down
4 changes: 4 additions & 0 deletions Windows/ServerImportWindow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,12 @@
<OnShow>
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_OPEN);
LootReserve.Server.Import:UpdateReservesList();
LootReserve.Server.Import:SessionSettingsUpdated();
</OnShow>
<OnHide>
if LootReserve.ItemSearch.FullCache and not LootReserve.ItemSearch.FullCache:IsComplete() then
LootReserve.ItemSearch.FullCache:SetSpeed(LootReserve.ItemSearch.DefaultSpeed);
end
CloseMenus();
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_CLOSE);
</OnHide>
Expand Down
9 changes: 8 additions & 1 deletion Windows/ServerLootEditWindow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,11 @@
LootReserve.Server.PendingLootTextEdit = true;
C_Timer.After(0.1, function()
LootReserve.Server.PendingLootTextEdit = false;
UpdateText();
if LootReserveServerLootEditWindow:IsShown() then
UpdateText();
else
CloseMenus();
end
end);
end
end
Expand Down Expand Up @@ -742,6 +746,9 @@
LootReserve.Server.LootEdit:UpdateLootList();
</OnShow>
<OnHide>
if LootReserve.ItemSearch.FullCache and not LootReserve.ItemSearch.FullCache:IsComplete() then
LootReserve.ItemSearch.FullCache:SetSpeed(LootReserve.ItemSearch.DefaultSpeed);
end
CloseMenus();
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_CLOSE);
</OnHide>
Expand Down

0 comments on commit 08815ab

Please sign in to comment.