Thread Tools Display Modes
06-16-09, 10:28 AM   #1
jbashara
A Deviate Faerie Dragon
 
jbashara's Avatar
Join Date: Apr 2009
Posts: 17
Any memory benefits with installing "standalone" libraries?

Hey guys, every month it seems I learn a little more and more about LUA addons from a layman's point-of-view, and I've noticed that many addons are offered with "nolib" alternatives.

Aside from disk storage, are there any benefits to installing the standalone libraries and using the nolib version of addons (or removing the embedded library if there isn't a nolib release)? The option has to exist for some reason; I'm just trying to figure out why.

Does it conserve in-game memory usage or clock cycles? Is there a read-write decrease, or a decrease in the amount of times an addon calls to that library?

Basically, what's the benefit? Or is it simply that is saves a few Kilobytes here and there, since there aren't duplicate libraries in all of your addon folders? I'm trying to figure out if it's worth the transition.

Thanks,

Josh
  Reply With Quote
06-16-09, 10:46 AM   #2
torokokill
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 8
I can only speak of Ace as it's the only library I've had experience with. This by no means applies to all libraries. I could be completely misinformed, as I haven't really used Ace in almost a year.

Ace will itself once. Every time a part of Ace is loaded it checks to see if it has already been loaded. If it has, it doesn't load itself if it's version is less than or equal to the one already loaded. If the new library is a newer version, then it replaces the one already loaded. The replaced/not loaded library's memory allocation is freed up at the next garbage collection. It's up to each library author to write this though, I do believe.

The more copies you have of that library, the longer your initial loading time will be. Each time an addon is loaded that includes that library, it needs to load in the library from the disk and then that library will check to see if it's been already loaded. However, once you're past the initial load it makes no real difference memory wise how many copies of a specific Ace library you have.

Last edited by torokokill : 06-16-09 at 11:06 AM. Reason: Spelling
  Reply With Quote
06-16-09, 10:54 AM   #3
jbashara
A Deviate Faerie Dragon
 
jbashara's Avatar
Join Date: Apr 2009
Posts: 17
Thanks for the reply. Okay, well if that's true for all libraries, then it sounds like it's really not worth the conversion. I'd love shorter initial load times, but that's pretty much what I use addon profiles for (via AddonSwitcher or whatever).

Anyone else care to comment or confirm?

Thanks again,

Josh
  Reply With Quote
06-16-09, 10:57 AM   #4
Tristanian
Andúril
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 279
Greetings Josh,

The "nolib" version of addons (often referred to as "running with disembedded or standalone libraries"), as you have already mentioned helps save a bit of disk space, depending on the number of addons you are using. Considering the fact however, that modern hard drives come with an abysmal size out-of-the-box, when compared to the few kilobytes that you are saving, the real "benefit" is really up to you to discover.

Other than that, it has been often iterated that disembedded libraries help decrease loading times (imagine a few seconds though this may vary if you are using more than let's say 40-50 unique addons with embedded libs), which is true to a certain extend, since no real version comparison occurs between libraries that are being embedded by multiple addons (note that when a library is being used by more than one addon, only one copy eventually stays in memory, the most recent version that is, the rest are garbage collected by WoW the first time the collector is run by the client). While this used to present a sort of an issue in the past, with a few libraries getting bloated by features that were only used by a couple of addons out there, the introduction of relatively lightweight frameworks such as Ace3 has remedied this, significantly.

All in all, you really shouldn't need to worry about disembedding. Just use the addons the way their author(s) intended them to be used. Disembedding was really meant to be used by authors and power users, for CPU/Memory profiling purposes (for the most part), since it is the only reliable way to "measure" the resources being used purely by the addon.

I hope this helps


P.S : Ace is not an acronym
__________________

Last edited by Tristanian : 06-16-09 at 11:00 AM.
  Reply With Quote
06-16-09, 11:06 AM   #5
torokokill
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 8
Ooops, I could have sworn that it was all capitalized anyway. My mistake.
  Reply With Quote
06-16-09, 11:16 AM   #6
jbashara
A Deviate Faerie Dragon
 
jbashara's Avatar
Join Date: Apr 2009
Posts: 17
Thanks for the reply. While I probably would consider myself a power-user (I have about 60 unique addons installed, not including their dependencies), it seems as if what both of you are implying is that it really comes down to is decreasing UI load times, and not in-game CPU cycles or RAM usage.

And if that's the case, then yeah, I can probably live without it.

That kind of begs a next question, which would be the merit in manually altering some of your addons to load-on-demand (I forget which dev tool allows this; one of Tekkub's or Ammo's?). But anyway, I'll probably make a separate post regarding that when I can do a little more research on it.

Thanks,

Josh
  Reply With Quote
06-16-09, 11:29 AM   #7
Tristanian
Andúril
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 279
Originally Posted by jbashara View Post
Thanks for the reply. While I probably would consider myself a power-user (I have about 60 unique addons installed, not including their dependencies), it seems as if what both of you are implying is that it really comes down to is decreasing UI load times, and not in-game CPU cycles or RAM usage.

And if that's the case, then yeah, I can probably live without it.

That kind of begs a next question, which would be the merit in manually altering some of your addons to load-on-demand (I forget which dev tool allows this; one of Tekkub's or Ammo's?). But anyway, I'll probably make a separate post regarding that when I can do a little more research on it.

Thanks,

Josh

You can manually alter an addon's .toc file and remove the "## LoadOnDemand: 1" tag, to effectively "force" it to load. In most (if not all) cases however, there is really no reason for you to do so. Usually addons marked as LoD are simple plugins, modules for bigger addons or configuration panels that simply aren't needed to be active the whole time but are loaded by the "parent" addon when a case calls for it or the user requires their specific functionality. The loading "trigger" can be anything really, a simple slash command, a certain event being fired etc, it varies between the addons in question.

Off the top of my head, I can only think of a couple of times where I absolutely had to remove a LoD tag, I think it was from certain FuBar plugins that I wanted to display by using a different display addon but since that specific addon did not support their LoD behavior, I had to force them to load right off the bat. In most cases, again, you shouldn't need to worry about it.
__________________
  Reply With Quote
06-16-09, 11:39 AM   #8
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
http://www.wowinterface.com/download...donLoader.html

If you do set it to load "delayed", then after the WoW client has finished loading all the mods and the loading screen has gone, Addon Loader will load your mod into memory, this is useful because it will shorten loading times, but when you log into the game world, the game may seem "laggy" for the first few seconds while WoW loads the mods.
  Reply With Quote
06-16-09, 12:03 PM   #9
jbashara
A Deviate Faerie Dragon
 
jbashara's Avatar
Join Date: Apr 2009
Posts: 17
Originally Posted by Slakah View Post
http://www.wowinterface.com/download...donLoader.html

If you do set it to load "delayed", then after the WoW client has finished loading all the mods and the loading screen has gone, Addon Loader will load your mod into memory, this is useful because it will shorten loading times, but when you log into the game world, the game may seem "laggy" for the first few seconds while WoW loads the mods.
Yeah this is what I meant. Enabling certain addons to LOD, not disabling the LOD function. AddonLoader is the addon I was referring to, also. I've been thinking about trying to make some of my addons manually LOD that aren't natively set to. I'm just not sure if it's possible to edit the LUA to add the LOD hook, and still have it work with AddonLoader.
  Reply With Quote
06-16-09, 02:36 PM   #10
Tristanian
Andúril
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 279
Just a small clarification. Addon Loader isn't some kind of magic sauce that converts your addons to Load-On-Demand if they aren't specifically set in that way inside their .toc. Addon Loader is just a "load manager", meaning that it can manage the way addons that are "aware" of the manager (## LoadManagers: AddonLoader in the .toc), are to be loaded, whether that means a delayed load or loading based on a specific condition, eg. a certain character class present.

If for some reason you decide to delete Addon Loader, your addon will still load normally, despite having the tags for it, in its .toc. If you disable Addon Loader and your addon(s) contain the tags to detect it, then they won't load AT ALL, since their load manager is present but not really working, so it does not "signal" them on when to load.
__________________
  Reply With Quote
06-16-09, 07:01 PM   #11
jbashara
A Deviate Faerie Dragon
 
jbashara's Avatar
Join Date: Apr 2009
Posts: 17
Originally Posted by Tristanian View Post
Just a small clarification. Addon Loader isn't some kind of magic sauce that converts your addons to Load-On-Demand if they aren't specifically set in that way inside their .toc. Addon Loader is just a "load manager", meaning that it can manage the way addons that are "aware" of the manager (## LoadManagers: AddonLoader in the .toc), are to be loaded, whether that means a delayed load or loading based on a specific condition, eg. a certain character class present.

If for some reason you decide to delete Addon Loader, your addon will still load normally, despite having the tags for it, in its .toc. If you disable Addon Loader and your addon(s) contain the tags to detect it, then they won't load AT ALL, since their load manager is present but not really working, so it does not "signal" them on when to load.
Right, I understand this. What I'm wondering is if we're able to manually edit the .toc and/or .lua to build the AddonLoader compatibility, as well as the LOD hook itself, if need be.

Also, from what I understood about AddonLoader, if an addon WAS already written to support it, the user could define specific hooks, like the addon not loading until the bank is visited, or entering a Battleground.

These are two separate questions. Are both true?

Thanks,

Josh
  Reply With Quote
06-16-09, 07:29 PM   #12
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
You should be able to find answers to all of your questions here.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
06-16-09, 09:11 PM   #13
jbashara
A Deviate Faerie Dragon
 
jbashara's Avatar
Join Date: Apr 2009
Posts: 17
Originally Posted by Torhal View Post
You should be able to find answers to all of your questions here.
Hey, thanks Torhal! I'm a fan of your addons. Revelation is brilliant. It seriously rocks my face.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Any memory benefits with installing "standalone" libraries?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off