Lag viewing sets and/or extra sets from a set link in chat when BagNon is enabled.
n1ckal opened this issue ยท 3 comments
As per the subject line, the issue is that whenever I loot an item and clink a link from chat about having added a piece of a set or the item itself.
Clicking the item: the addon takes ages to open the item and sometimes on finding the item immediately goes to page one of items in that slot.
Clicking the set link: the addon takes ages to evaluate the sets i have and doesnt ever seem to go to the set referenced. In fact it goes to the top set and even manually scrolling is painfully slow.
I have on occasion seen errors about a script taken a long time to run.
This situation is always the case with Bagnon enabled, and happens maybe 10% of the time without Bagnon - which leads me to believe based on that 10% that this is wholly within your power to fix.
Given a choice between Bagnon and better wardrobe, it is easier for me to function without BetterWardrobe than without BagNon.
Well it took a while but I finally managed to track down the cause of the lag when Bagnon is enabled. Bagnon hooks into the TooltipDataProcessor, so every time a tooltip is shown Bagnon tries to look up how many of the item a player has and adds that info to the tooltip. BetterWardrobe uses hidden tooltips to look up class data for the sets window. So when scrolling Bagnon is queuing up a bunch of lookups which is causing the lag. A partial fix is that I've added a cache for the data from the tooltips, so after the initial lookup BetterWardrobe can use the cache eliminating Bagnon from triggering multiple lookups and causing some lag. Unfortunately there is still going to be some initial lag, but once things get caches the lag should stop. Additionally I found a few places where things were not getting cached properly and fixed them, so that hopefully should clear up some of the non Bagnon lag.
Figured out how to parse the tooltip data I need with out having to set the tooltip. This will prevent the triggering of the Bagnon's lookups and should get rid of a bunch of the lag.