-
Efficiency question (\aPC says|You say) to the raid
Is there a more efficient way to do this regex?
(\\aPC \d+ [^:]+:[^\\]+\\/a says|You say) to the raid party, "START TIMER"
-
ACT Developer
Re: Efficiency question (\aPC says|You say) to the raid
Sure, but not particularly. That one will fail a match fairly quickly as most log lines don't start with either branch. Though you don't need a real capturing group to have a sub-branch. (?:_____) is a non-capturing group and would be more logical here than (_____) as it doesn't use resources to do the capturing.
Anyways, I already made changes so that partial string matches work without TTS drawbacks and will have higher performance than recreating the literal string. As in, to the raid party, "START TIMER" will work fine for your purpose and be higher performance. Maybe twice as fast, though you'd probably not find a situation where you can see the difference outside of a benchmark.
-
Re: Efficiency question (\aPC says|You say) to the raid
I have a question somewhat related to this. I was working on building a trigger for Arch-Magistor Modrfrost, specifically something along the lines of his detriment causing damage to a raid member. I'm not at home in front of my PC, but it was something to the effect of Arch-Magistor Modrfrost's Ghastly Pallor hits Chanson for 1,111 damage. The trigger I created was something along the lines of
Arch-Magistor Modrfrost's Ghastly Pallor (?:critically hits|hits) (?<player>.+?) for.*
I wasn't really interested in how much they were damaged for, just that they were damaged so we knew who to use the looted items on. My question arises around me testing after we moved on to another mob and i would /say that same line and it would set off the trigger. So even though the log line doesn't start with Arch-Magistor, it was still getting picked up in the log line; this makes me think it isn't very efficient if every line that doesn't start with Arch-Magistor is not failing right away. Is this because of the .* at the end? If so, would replacing the ".*" with "\d damage\." fix it so it isn't check lines that don't start with Arch-Magistor?
After a little more research I found that I could also start my trigger as ^Arch-Magistor..... and with the ^ it expects the beginning of the line to be Arch-Magistor. Would that be more efficient?
Last edited by Teyjattt; 02-06-2012 at 12:47 PM.
-
Re: Efficiency question (\aPC says|You say) to the raid
why make a trigger.. just use the detrimental plug-in or just cure all 4.. they are instant cast and you can get all 4 in the 13 secs alloted
-
Re: Efficiency question (\aPC says|You say) to the raid
I will look in to the plug-in. I'm still curious about the efficiency of the trigger as I don't want all my other triggers to be not failing at the beginning like I expect them to.
-
ACT Developer
Re: Efficiency question (\aPC says|You say) to the raid
Adding ^ to the beginning should work and be technically faster. It's probably not enough for you to worry about, however.
This is the plugin, btw.
http://www.eq2flames.com/plugin-disc...1-3-1-8-a.html
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules