|
monkeybone Newbie
Joined: 02 Jun 2003 Posts: 6
|
Posted: Mon Jun 02, 2003 10:36 pm
Speed? |
I have the basics of a system for my mud. The problem now is speed. What can I do to improve performance?
So before I make changed I'd like to check a few things.
Trigger length will slow down parsing?
Is it faster to have a single trigger than multiple ones? For instance, if you want to heal yourself and see the line, "You may heal yourself." colored, is it faster to put both in one trigger or separate ones?
I am doing alot of parsing off of the prompt, which has flags. knpsq> etc. The combination changes. Am I better off, again speed wise, to have separate triggers, or would it be faster to have one and then parse the trigger and set variables?
I also have a very long alias I call to check all possible flags, bleeding, stunned, prone, kneeling, etc, etc, etc. I use this to give my next action priority. For instance, wait for stun to wear off before doing anything else.
I know its a very general question, but in general, how is the best way to manage a frequently used intensive flag system using structured IF statements (it gets triggered off the prompt)? Would using a database give any speed performance? Would just checking for any flags being set and then using a different alias be much faster then checking everything in one fell swoop?
Thanks |
|
|
|
monkeybone Newbie
Joined: 02 Jun 2003 Posts: 6
|
Posted: Mon Jun 02, 2003 10:55 pm |
In addition, I meant to ask...
In the triggering the following line:
Your lifeforce seeps away as the ghastly shadow touches you.
Which would be faster to trigger and why if you can explain?
^Your lifeforce seeps away as the ghastly shadow touches you.
^Your lifeforce seeps
lifeforce seeps
Thanks. It may be nitpicky timewise, but when you have a couple of hundred triggers and an older machine its helps. And yes the ones that don't need to be abled are disabled when not in use. ;-) |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jun 03, 2003 12:29 pm |
My guess is that it is faster to put all commands that deal with one particular line received from the MUD in the same trigger.
As for matching a pattern, the more plain-text a pattern contains the better. zMUD tries to discard lines as not matching a pattern as quickly as it can. If a pattern has more text, it is easier for zMUD to tell that a line is not a match for that trigger.
Also, you can use the %secs pre-defined variable to time some of your processes and find out if it is more efficient in one way or another.
Kjata |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|