in reply to FAST way to pull multiple lines around a keyword
I think it is taking a long time
My alarm bells are ringing - optimizing based on unverified assumptions is a very bad idea. Test your assumption with a profiler like Devel::NYTProf before trying to improve anything.
I personally would expect the download to be much slower than the searching; if that turns out not to be true, my next attempt would be to split on newlines, search each line, and if you have a match, also look at the lines before and after.
|
|---|