Thread Tools Display Modes
04-01-07, 12:15 AM   #1
shiv
A Defias Bandit
Join Date: Jan 2005
Posts: 2
Libraries - if multiple usages - pull them into main interface dir?

Hey all,

quick question - if you have a few addons that use the same library.. Ace for instance.. is it more efficient (ram / cpu) to pull that lib. into the interface folder, or to keep each instance of it in the lib folder of each specific addon?

thanks!

Shiv
  Reply With Quote
04-01-07, 01:58 AM   #2
Treebar
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 6
you would have to download the standalone version of the library and put it in the AddOns folder

if you have more addons sharing the same library you will speed up your loading times if you use the standalone library and remove all instances of the embedded library, there will be no difference other than the loading times though

more info available at wowace.com
__________________
Author of ElectrofluxTextronator

Belse - Trollbane - EU
  Reply With Quote
04-01-07, 01:59 AM   #3
shiv
A Defias Bandit
Join Date: Jan 2005
Posts: 2
awesome - that's what i needed to know.

i've already extracted them all and put them in the addons folder.
everything works great so i'm good to go then!

Thanks.
  Reply With Quote
04-01-07, 02:28 AM   #4
Shirik
Blasphemer!
Premium Member
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2007
Posts: 818
Loading times, yes. But you won't use up any extra memory. What happens is you get something like this:

In one addon...
Code:
-- Library.lua
function someFunc()
   -- Do stuff
end
And in another addon...
Code:
-- Library.lua
function someFunc()
   -- Do stuff
end
So merely the second one overwrites the first. Since they're the same, there's no effect. The thing is, though, you still have to read the file and write the data to memory, so the load time is affected. But other than that, the worst thing that could happen is a bit of (potentially noticable) memory churn that would later be picked up by the GC.
  Reply With Quote
04-01-07, 05:09 AM   #5
aastarius
An Aku'mai Servant
 
aastarius's Avatar
Join Date: Dec 2005
Posts: 35
These days I use the "pull the libraries" method so that I only have one of each available.

Best way of doing this is to download the !!!standAloneLibraries and via the WoWAceUpdater update it WITH externals. Then for all other installed addons, update them WITHOUT externals. Works a treat for me and has eliminated the little niggles that used to occur when versions within the individual addons were not quite the same and "occasionally" caused issues with each other.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Libraries - if multiple usages - pull them into main interface dir?


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