Realistically if you're downloading thousands of HTML pages and matching them against a regexp, it's unlikely to be the regexp that's slowing you down.
The first place to look at optimizing is the HTTP layer itself. When you request the pages are you sending an Accept-Encoding header? In many cases, this will allow the pages to be transmitted with compression. (Many of the Perl HTTP libs will automatically handle the decompression for you.)
If you're using LWP::UserAgent, perhaps try switching to Furl::HTTP which is somewhat faster. It doesn't have quite as many features as LWP::UserAgent, but it might have enough for you.
Could you try requesting pages in parallel rather than one at a time? If so, take a look at AnyEvent::HTTP.
In reply to Re: Matching simple patterns - is there a faster way?
by tobyink
in thread Matching simple patterns - is there a faster way?
by mrguy123
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |