View Single Post
06/24/15, 04:36 AM   #12
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
nice comment i got!

Originally Posted by Phinix
Originally Posted by QuadroTony
thanks for update looks like i can delete Khrill master cook now, this addon have all i need

whan about crashes i posted?
can crash at guildbank be connectedwith this addon too?
If you are referring to the issue with EVENT_SINGLE_SLOT_UPDATE then no, this addon can not contribute to crashes at the bank. That is because ESOMRL already has it's own checks built in and doesn't run any code at all when EVENT_SINGLE_SLOT_UPDATE fires due to interaction with a bank.

There are basically two approaches to optimizing an addon for use with a specific event:
  1. Throttle the use of the event globally as a "catch all" so that performance is less reliant on authors coding proper checks on their own and...
  2. Apply proper checks on the function called by the event so that there is no need for additional third party throttling.

ESO Master Recipe List handles the later. Granted, there are certain addons such as loot managers that delete certain items you loot based on filter settings, or Loot Drop type addons that display statistics about every looted item, that could potentially benefit from such throttling, though most of these will also not be related to bank crashes because they apply the same checks as ESOMRL, specifically the "isNewItem" check.

To understand what this means, consider the following values are available to the function return of the EVENT_SINGLE_SLOT_UPDATE event (meaning any addon which registers for this event has these values sent to whatever function they specify whenever the event fires):

Code:
eventCode, bagId, slotId, isNewItem, itemSoundCategory, updateReason
The "isNewItem" value is a Boolean (true or false) which will be true if the item just had a unique ID generated, meaning it was just looted (from a mob or crate, etc.), and false if it was already seen, like when you take something out of the bank.

ESOMRL only uses EVENT_SINGLE_SLOT_UPDATE for the auto-junk and auto-delete feature for ingredients and recipes, and there are several checks including "isNewItem" which will prevent any of the function code from ever running if these criteria are not met.

For example, if the item is added to your inventory from a bank and not from a monster or loot source in the world, the function doesn't run. If the item is not a recipe or ingredient, the function doesn't run. If Roomba is running, if you are under arrest, or if the item is already marked as junk, the function doesn't run.

There is very little overhead generated by the proper use of EVENT_SINGLE_SLOT_UPDATE to selectively parse specific items being added to the player in specific scenarios, as ESOMRL does. It isn't like ANY use of this function automatically breaks things!

As I said there may be some addons that do a lot of work for every single item added to any inventory in any scenario, however ESOMRL isn't one of them.

I do think it can be helpful for people who run a lot of addons (some of which might either be badly coded or have a real need to do a lot of processing on every single item you add to any inventory) and who's systems are already taxed to the limit in terms of memory and CPU usage to have a third party library do throttling on the entire workload of that addon. HOWEVER, I want to be clear (as others have mentioned) that not every addon will need to use this simply because they use EVENT_SINGLE_SLOT_UPDATE, nor will throttling in addons that are already properly coded prevent crashes related to CPU/memory bottlenecking.

Thanks for taking an interest, and I hope you are able to work out crash the issues you are having.
  Reply With Quote