I'm trying to port some string subs from Tintin to Mush but I've noticed some pretty significant performance degradation. I suspect it has to be with the way I setup the regex. I have roughly 100 of these spell subs.
In Tintin, the syntax I use is like
In Mush, I couldn't figure out an exact 1-to-1 match to the tintin #substitute command so I use a trigger with omit output to mimic #sub behavior. I do the following which seems to have heavy performance penalty. If I add an anchor ^ at the beginning of the pattern will that help performance? Or is there a more robust way or better technique to what I'm doing?
Ideally if I encounter something like
A wooden splint is here. [2]
I'd like the sub to replace it with
A wooden splint [LOW HEA] is here. [2]
In Tintin, the syntax I use is like
#sub {%1 wooden splint} {$1 wooden splint [LOW HEA]}In Mush, I couldn't figure out an exact 1-to-1 match to the tintin #substitute command so I use a trigger with omit output to mimic #sub behavior. I do the following which seems to have heavy performance penalty. If I add an anchor ^ at the beginning of the pattern will that help performance? Or is there a more robust way or better technique to what I'm doing?
<trigger colour_change_type='1' enabled='y' expand_variables='y' group='spellcomps'
match="(.+) wooden splint(.*)" omit_from_output='y' regexp='y'
send_to='12' sequence='100' other_text_colour='white'>
<send>ColourNote("silver","black","%1 wooden splint [LOW HEA]%2")</send>
</trigger>Ideally if I encounter something like
A wooden splint is here. [2]
I'd like the sub to replace it with
A wooden splint [LOW HEA] is here. [2]