|
Ryntrax Wanderer
Joined: 15 Mar 2004 Posts: 55 Location: USA
|
Posted: Mon Mar 29, 2004 1:53 pm
Databasing |
In my usage of DB in ZMud i have run in to a lot of slow calculation times. Has anyone used any other language besides the ZMUD commands and seen any faster.
Also in regards to triggers.
Is there a command to force ZMUD to compute the entire trigger before moving onto the next line. So not to get screwy results. Such as recieving multiple lines of the same text. My triggers sometime miss lines and or combind info from multiple lines in on fire.
Ideas? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Mar 29, 2004 4:08 pm |
If the slowness is due to the database, there might not be much you can do about that by using another language.
As for the second question, use the #PRIORITY command to enclose the commands you want zMUD to execute before processing any more MUD output. |
|
|
|
Ryntrax Wanderer
Joined: 15 Mar 2004 Posts: 55 Location: USA
|
Posted: Mon Mar 29, 2004 4:29 pm |
I have tried that and it is just skiping lines if it does lag out.
Until it has finished.
Examaple:
John is a good guy.
James is a bad guy.
Ben is a good guy.
Sarah is a good girl.
#trigger {^(%w) is a (%w)*.} {#new peoples {Name=%1|align=%2}
Something such as this would maybe input 3 people and miss on because of lag. So would priority stop all processing from the mud and then resume at the same point it stoped or whatever point it is at when it is done.
Ofcource i would be using a while or whatever to query the db. and there would be more lines. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Mar 29, 2004 7:08 pm |
I doubt that the trigger you posted would have any difficulty with four (or four hundred) names. It's far more likely that your 'lag' comes from the "while or whatever to query the db" that you didn't bother to post.
Use %query or %find instead of a loop. They should be much faster. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Mar 29, 2004 8:23 pm |
Yes, #PRIORITY will stop processing of MUD output until it is done. After it finishes, MUD output resumes where it left off.
Here is the entry from the help file:
quote: PRIORITY
Syntax: #PRI {commands}
Execute a list of commands at high priority. Data from the MUD is not processed during this execution. This is useful for high-priority loops that need to be finished before the next line from the MUD is processed. Be sure not to execute any commands that are too time consuming, such as a #WAIT command since all MUD data is paused during the processing.
You can test #PRIORITY with the following script:
#TRIGGER {test} {#PRIORITY {#LOOP 1,10000 {a=%i}}}
#SH test
#SH test
You should notice a pause between when the first "test" is displayed and when the second "test" is displayed. If you change 10000 for a bigger number, the pause is longer. |
|
|
|
Ryntrax Wanderer
Joined: 15 Mar 2004 Posts: 55 Location: USA
|
Posted: Mon Mar 29, 2004 9:37 pm |
Thanks LB that will probly work.
|
|
|
|
|
|