Download
(3Kb)
Download
Updated: 02-21-08 05:17 AM
Updated:02-21-08 05:17 AM
Created:unknown
Downloads:1,351
Favorites:5
MD5:

EfficientSlashScript

Version: 1.0.0
by: Saeris [More]

Overview

This extremely simplistic addon caches "/script" (and "/run") evaluations from macros, saving each function as it corresponds to the given script text. This reduces memory and CPU usage. It's not a big difference by any means, but will reduce resource wasting if any of your oft-used macros contain a "/script" line.



Addon Type Information

Addon type: Interface
Libraries used:

  • none

See the readme file in this addon's folder, or my author portal, for an explanation of the addon type system used.



Support

If you found a bug in this addon, want to provide feedback, want to help translate it, or even just want to ask a question, please contact me using one of these methods:

Email address: [email protected]
ICQ number: 119161819
AIM screenname: SaerisSanoora
Penny Arcade forums name: Saeris

If you use any other method, it might take me significantly longer to see your message and reply.

If you wish to support my efforts, you can donate via PayPal by clicking this button:



History of Changes

See the readme file in this addon's folder, or my author portal, for an explanation of the versioning system used.


1.0.0 (Feb 21, 2008):
  • Initial release.


See the readme file in this addon's folder for earlier changes.

Optional Files (0)


Post A Reply Comment Options
Unread 12-17-08, 01:48 AM  
Saeris
A Murloc Raider
 
Saeris's Avatar
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 126
Uploads: 75
Originally posted by Nefarion
I'm a little concerned that you're withholding the memoized (cached) functions from the garbage collector altogether. Given the limitation on the size of /run commands, I think you're ultimately causing more harm than helping. At the least, you should make your cache a weak table:

Code:
local l_scriptCache = setmetatable({},{ __mode = 'kv' });
With that small change, the results will still be cached, but the data won't be withheld from the garbage collector when free collection room is available, so you don't stockpile tons of memory, especially for run-once commands.

Otherwise, nice idea in theory. I'm just not sure the negligible (non-)benefit is even worth the time to install, even with the fix.
It only caches scripts from macros (those executed from the MacroEditBox, not the ChatFrameEditBox), which are presumably run rather often (almost surely more than once) since they're being used in actions. So, it's not holding onto entirely useless data most of the time. But I will admit that using a weak table is still a good idea, since that'll keep the function in memory for just long enough to help with the sort of button-spamming that I was targeting in the first place, and then let the GC mow it down afterward.

Honestly though, I wrote this when I was under the impression that the Lua interpreter/bytecode-compiler wasn't quite as absurdly fast as it is. I remain convinced that this addon offers some benefit for macro button-spammers, but it is undoubtedly minor.
__________________
Last edited by Saeris : 12-17-08 at 01:49 AM.
Report comment to moderator  
Reply With Quote
Unread 12-15-08, 01:52 PM  
Nefarion
A Defias Bandit
 
Nefarion's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 57
Uploads: 14
I'm a little concerned that you're withholding the memoized (cached) functions from the garbage collector altogether. Given the limitation on the size of /run commands, I think you're ultimately causing more harm than helping. At the least, you should make your cache a weak table:

Code:
local l_scriptCache = setmetatable({},{ __mode = 'kv' });
With that small change, the results will still be cached, but the data won't be withheld from the garbage collector when free collection room is available, so you don't stockpile tons of memory, especially for run-once commands.

Otherwise, nice idea in theory. I'm just not sure the negligible (non-)benefit is even worth the time to install, even with the fix.
Report comment to moderator  
Reply With Quote
Unread 05-28-08, 02:59 AM  
Manaman
An Aku'mai Servant
AddOn Author - Click to view AddOns

Forum posts: 39
File comments: 160
Uploads: 1
Originally posted by 0ptical
Why exactly do you want Donations for this addon?
I am guessing it is a line he/she posts on all his/her addons. And if you look, this author has a lot of them. Consider the amount of time and effort spent maintaining so many addons.
Last edited by Manaman : 05-28-08 at 02:59 AM.
Report comment to moderator  
Reply With Quote
Unread 02-21-08, 02:27 PM  
0ptical
A Defias Bandit

Forum posts: 3
File comments: 2
Uploads: 0
This extremely simplistic addon
Why exactly do you want Donations for this addon?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: