I was wondering how fast enabling and disabling groups of triggers/aliases/etc was. For instance, in a current plugin I usually change at least one group per line, one some lInes as many as six. Is this effecient or will it slow MushClient down noticablely?
speed of groups
Posted by Tsunami on Sun 05 Feb 2006 07:16 PM — 5 posts, 23,371 views.
Enabling/disabling a group takes about 0.000005 seconds for me, which includes the time needed to set up a loop for timing it. The whole loop included 100,000 iterations, each enabling and then disabling the same trigger group, and took around half a second to execute.
So your plugin would need to have a script section the size of "War and Peace" for you to notice any lag from those operations. Besides, even if you perform something on every line of your script, doesn't mean that all those lines will be executed every time something in your script is called.
P.S. I tested with Lua. Any other language should be much slower, but unless you do thousands of EnableTriggerGroup's at once, it still shouldn't be a problem.
So your plugin would need to have a script section the size of "War and Peace" for you to notice any lag from those operations. Besides, even if you perform something on every line of your script, doesn't mean that all those lines will be executed every time something in your script is called.
P.S. I tested with Lua. Any other language should be much slower, but unless you do thousands of EnableTriggerGroup's at once, it still shouldn't be a problem.
Ok, thanks a bunch. I'd still like to see more of a tree structure to groups, with parents and children, ... but I'll survive for now :P
Any other language should be much slower?! Omg, *drops Python* *goes to Lua*
I don't know about "much slower" - internally they are calling the same functions. There is an overhead in COM calls, and there is an overhead in Lua calls, I haven't measured the difference.