AWS Thinkbox Discussion Forums

Better Efficiency with AddStdoutHandlerCallback

Hello,

Quick question, is it more efficient on the deadline side to have per line “AddStdoutHandlerCallback” like:

self.AddStdoutHandlerCallback(".*Warning: .*").HandleCallback += self.HandleErrorMessage
self.AddStdoutHandlerCallback(".*Error: .*").HandleCallback += self.HandleErrorMessage

Or more efficient to put them in one line with and or :

self.AddStdoutHandlerCallback(".*Error: .*|.*Warning: .*").HandleCallback += self.HandleErrorMessage

Especially if they all go to the same Handler.

Cheers
Kym

Having them all in one should be marginally faster, but I’d probably do whatever’s more readable for you. In this case, combining just two into one isn’t bad, however if there’s like 15 different regexs you’re trying to catch in one line… then it starts looking hairy. Are you experiencing a bottleneck with regards to stdouthandlers?

Cheers

Privacy | Site terms | Cookie preferences