I use a relatively slow computer, so speed in processing of any statements or variables is usually a pretty touchy issue for me. I'm wondering about how long processing a variable's contents takes. Here's what I mean:
if world.GetVariable("weather") = "rainlightning" then
vs.
if world.GetVariable("weather") = "rl" then
vs.
if world.GetVariable("weather") = "2" then
Out of the three possibilities, are there any significant differences in speed? Does downgrading the variable contents from "rainlightning" to "rl" or "2" (or "r" or an equivalently small number of characters) make much of a time difference when the if function is being processed? I'd have a large number of these "if" statements, so even a small difference would probably build up for me.
Also, does MUSHclient experience much slowness when dealing with numerous (as in upwards of 30 or so) elseifs and nested ifs in one script? If it does, is there any method around it?
As another question, when does using a script file rather than the "send to: script" function become a better idea? Most of the scripts I have are pretty small, being usually 3-10 lines or so. However, a few are fairly giant in comparison. So should I use all script functions via a script file, or is it fine if I just do that with the very large ones?
Finally, when setting the sequence number, how low should I go? If there's one trigger that pops up far more frequently than most others, should I set it at a sequence number of 90, or would 99 suffice when everything else is 100?
I apologize if these questions are somewhat vague, as I have a habit of sometimes being like that. Just yell and throw stuff at me if you need me to clarify something. Thanks for any response.
if world.GetVariable("weather") = "rainlightning" then
vs.
if world.GetVariable("weather") = "rl" then
vs.
if world.GetVariable("weather") = "2" then
Out of the three possibilities, are there any significant differences in speed? Does downgrading the variable contents from "rainlightning" to "rl" or "2" (or "r" or an equivalently small number of characters) make much of a time difference when the if function is being processed? I'd have a large number of these "if" statements, so even a small difference would probably build up for me.
Also, does MUSHclient experience much slowness when dealing with numerous (as in upwards of 30 or so) elseifs and nested ifs in one script? If it does, is there any method around it?
As another question, when does using a script file rather than the "send to: script" function become a better idea? Most of the scripts I have are pretty small, being usually 3-10 lines or so. However, a few are fairly giant in comparison. So should I use all script functions via a script file, or is it fine if I just do that with the very large ones?
Finally, when setting the sequence number, how low should I go? If there's one trigger that pops up far more frequently than most others, should I set it at a sequence number of 90, or would 99 suffice when everything else is 100?
I apologize if these questions are somewhat vague, as I have a habit of sometimes being like that. Just yell and throw stuff at me if you need me to clarify something. Thanks for any response.