Quantcast WoWInterface - View Single Post - Are all addon "open source"?
View Single Post
12-11-13, 04:36 AM   #15
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I know you're trying to be helpful, but as in some other recent thread, the information you're giving is simply wrong.

The only possible advantage a smaller file could have would be in reducing the amount of time it takes to read the file from your hard disk, and there's simply no way that any functioning modern hard drive is going to take 2-3 additional seconds to read a few hundred KB worth of files. (Basing that size on the size of a BigWigs zone module; I can't imagine DBM modules are all that much bigger.) The size of each file is not really what matters. The quantity of files will have a much more noticable effect. If you are really hyper-obsessed with minimizing the time it takes to load your addon, you'll see a much bigger difference by combining all of your code into one file, than you will by reducing all of your variable names to single letters and removing all the whitepsace from each file.

Also, most of the time it takes to load an addon has nothing to do with either the size or the quantity of files in the addon -- it's in your code being compiled and executed, and the Lua interpreter doesn't give a rat's behind whether your variable name is 1 or 1000 letters long.

Minifcation is useful in, say, the JavaScript code for a website -- but it doesn't make the code itself load or run any faster, it only makes it faster to transfer the file from the server to your computer. No files are being transferred across a network in the WoW addon environment, so that isn't a concern. The only reason to minify, obfuscate, or do any similar thing to the code of a WoW addon is to make your code harder for other people to read because you're paranoid that someone is going to copy you.

This is why Bejeweled and Peggle got permission to obfuscate their code -- because those are addons based on established proprietary games that are sold for profit, and it wouldn't make sense for their creators to suddenly start giving away the code for free, and Blizzard loses nothing by letting them run their game inside of WoW. In fact, Blizzard benefits from it, in that people are less likely to get bored and quit if they have something fun to do in between real activities like dungeons and raids.

TLDR version: Minifying or obfuscating your WoW addon code has no benefits for normal addon authors.
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote