Hello. I'm currently trying to optimize my Mushclient worlds by cracking down on the most time intensive triggers. I wrote a simple script to go through GetTriggerList() and divide GetTriggerInfo(x, 37), which is total time taken to match, by GetTriggerInfo(x, 38), the total number of attempts to match. This would give me the average time each trigger takes on each attempt, and I can just compare to find the worst.
However I started noticing some strange behavior, which is either a bug in Mushclient or a misunderstanding on my part. The triggers that floated to the top of my list claimed to have only attempted to match one time, yet their number of successful matches (trigger info 21) is higher than one. On any normal trigger this is impossible because an increment to 21 will also result in an increment to 38.
Luckily, it was easy to see what these 'one match' triggers had in common, which is that they all had expand variables checked and matched a variable in their regex, like @target.
What do you think? |