in reply to Fast/efficient way of check if a string in an strArr is contained in a line
One approach might be to pull in bunches of log file lines and scan them together, amortising the overhead of the loop and the regex start-up.
How many entries do you get in the @bypList ? Could you put them all together into a single regex, which you could qr// ? Eliminating the foreach and the regex start-up.
Combining both the above might make a difference.
How general are the regexes ?
Otherwise, can you change the problem so that the @bypList is at least a single regex constructed with some intelligence ? Or construct a two step process, with a first, simple, regex (or something else) that rules out a high proportion of lines ? Even if the full generality of a regex is required for final identification of lines to be skipped, can some quicker filter be constructed -- by hand or automatically ?
Doesn't look entirely straightforward to me...
|
|---|