Originally Posted by Tonyleila
Do !BugGrabber, !YouArentInAPartyFix, Achieved! not use libraries?
|
No, those addons do not use any libraries, though I find it very telling that you posted to ask that question instead of just opening your AddOns folder and looking for yourself.
Also, even if addons loading before AdiBags
do use any libraries, they may not use the
same libraries, or their copies of libraries may be older than the copies included in AdiBags.
For example:
1. Addon "Apples" loads. It includes:
- Library "LibAlpha" version 12 - gets loaded, because no version of "LibAlpha" is loaded yet.
- Library "LibBeta" version 10 - gets loaded, because no version of "LibBeta" is loaded yet.
- Library "LibGamma" version 4 - gets loaded, because no version of "LibGamma" is loaded yet.
2. Addon "Bananas" loads. It includes:
- Library "LibAlpha" version 12 - gets skipped, because the same version of "LibAlpha" is already loaded.
- Library "LibDelta" version 1 - gets loaded, because no version of "LibDelta" is loaded yet.
3. Addon "Cherries" loads. It includes:
- Library "LibBeta" version 8 - gets skipped, because a newer version of "LibBeta" is already loaded.
- Library "LibGamma" version 4 - gets skipped, because the same version of "LibGamma" is already loaded.
- Library "LibDelta" version 2 - gets loaded, because it's newer than the version of "LibDelta" that was already loaded.
4. Addon "Coconuts" loads. It includes:
- Library "LibAlpha" version 13 - gets loaded, because it's newer than the version of "LibAlpha" that was already loaded.
- Library "LibBeta" version 10 - gets skipped, because the same version of "LibBeta" is already loaded.
- Library "LibDelta" version 3 - gets loaded, because it's newer than the version of "LibDelta" that's already loaded.
At the end of this process, only 1 copy of LibAlpha, 1 copy of LibBeta, 1 copy of LibGamma, and 1 copy of LibDelta are actually loaded into memory.
The other 2 copies of LibAlpha, 2 copies of LibBeta, 1 copy of LibGamma, and 2 copies of LibDelta were examined and discarded after it was determined that they were not newer than the copy currently in memory.
The addon Coconuts has the newest copy of LibAlpha, so all of LibAlpha's resource usage (consumption of both memory and CPU time) will be attributed to Coconuts, even though Apples and Bananas are also using LibAlpha.
All of LibBeta's resource usage will be attributed to Apples, even though Cherries and Coconuts also use LibBeta.
All of LibGamma's resource usage will also be attributed to Apples, even though Cherries also uses LibGamma.
All of LibDelta's resource usage will be attributed to Coconuts, even though Bananas and Cherries also use LibDelta.
The resource usage of Coconuts and Applies will appear higher than they actually are, because they are getting blamed for every byte of memory and CPU cycle consumed by LibAlpha and LibDelta or LibBeta and LibGamma, respectively.
Meanwhile, the resource usage of Bananas and Cherries will appear much lower than they actually are, because both addons are using library files inside other addons' folders.
WoW's tools for measuring the resource usage of addons is fairly primitive. It can only show you a breakdown of memory usage on an addon folder basis. It cannot show you which functions in which files are using how much memory, and it cannot show you which functions in which other files called the functions that are using the memory.
With CPU profiling, you can see in a bit more detail how much CPU time each function is using -- but it still cannot show you how those functions are being called, so you can see that LibAlpha:DoLotsOfThings(x, y, x) is being called a lot, but you can't tell if Coconuts is calling it 99% of the time and Bananas 1% of the time, or if Apples is calling it 25% of the time, Coconuts 25% of the time, and Bananas 25% of the time.
If you've bothered to read this far, hopefully you will now have a slightly better understanding of why the resource numbers you see for addons that use libraries are completely meaningless if any other addons that also use -- or even include -- those libraries are also enabled.