View Single Post
11/24/14, 10:54 AM   #10
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,014
Thank you very much for all your analysis Circonian!!!

I didn't dig this deep into it, there may be a reason, but you might also want to look at: Why is libFilters Unregistering AdvancedFilters_Dropdown_fitler twice in a row, then registering it, then unregistering it again, then registering it again ? It also shows the AdvancedFilters_Button_Filter being unregistered twice in a row, then reregistered?

All of that is in a single click of an inventory tab and those are supposed to be unique filter ID's are they not? so it has to be the same thing its unregistering & registering multiple times correct?
This is EXACTLY what I've written in my post before your posts!
libFilters does unregister and reregister the filters about 30000! times in total, if you just switch around between some of the invetory tabs and subtabs of AdvancedFilters.

After your analysis of the AdvancedFilters functions for the dropdown boxes and the callback functions this seems to clear things up, why the number is that high.

Aren't these filterID's UNIQUE...why are they being unregistered at all, if you just re-register the exact same filter ?
Either way the exact same filter is getting unregistered & reregistered multiple times as we can see, unless I am missing something if the filterID's are not unique or being changed in the code somewhere & I missed it.
Yes the filter IDs are qunique. But they are used with different content and the same ID.
Example: They get unregistered to remove let's say the "armor types" dropdown filter and reregister teh same filter ID with the "weapon types" dropdown filter, if you change from the inventory tab "Armor" to "Weapons". At least this is what I understand AdvancedFilters does.
If you do not unregister the old filter the callback function will try to hide "armor types" from the "weapons" tab?!

But you are right with the question: Why is it happening so often?


Doesn't v just represent functions in the table that tell if something should be displayed or not...since v is not a boolean (correct?) then wont the: if(v) always return true. If v did not exist it never would have made it to that part of the code, it would have broken out of the for loop before that.
Yeah, you are right.

Creating filters is not very hard, it can be done with 1 function & 1 line of code to change the filter.
I know. I have coded everything without libFilters in some older versions of FCOItemSaver. I've changed to use libFilters as the library was stable and AdvancedFilters has used it, because then the filters registered will work all together between different addons. And this is what I want. I don't want to recode AdvancedFilters :-) But thx for the information.


Result
I think the bug of the slowdown comes from AdvancedFilters (dropdown change functions) + libFilters (refresh of inventories after each filter registered, where the same filters get registered a thousand times upon one inventory tab change) then.

Bug fixing
I hope the addon author of libFilters and AdvancedFilters can take a look at Circonian's research and fix the un- & reregistering + needles inventory updating in those 2 addons.
-> Maybe we can talk about the changed enchanting filter in libFilters at the same time

I'll try to find a "workaround" solution for the inventory updates too which I can implement to fix things "roughly" for now.

Question
I do not understand why the errors in AdvancdFilters and libFilters, explained by Circonian above, don't slow down the game generally?

Example:
If you simply use AdvancedFilters addon, maybe together with some of the plugin addons, the changing of inventory tabs is fast and smooth. Even here the unregistering and reregistering of filters take place about thousands of times and the inventory is updated many times.

But at the moment you enable FCOItemSaver addon too, together with AdvancedFilters, the game gets sloooooooooow.
Is this only because of the updating of inventory contents after each filter reregistering, and because FCOItemSaver uses extra textures inside the inventories to show the marked items?

I'm wondering why the game does not slow down markable if you simply use AdvancedFilters without FCOItemSaver?


To All:
Thank you very very much for all the research into this problem so far!

Last edited by Baertram : 11/24/14 at 11:12 AM.
  Reply With Quote