Re: perl multithreading performance
- From: "J. Gleixner" <glex_no-spam@xxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Aug 2008 10:32:02 -0500
dniq00@xxxxxxxxx wrote:
Hello, oh almighty perl gurus!
I'm trying to implement multithreaded processing for the humongous
amount of logs that I'm currently processing in 1 process on a 4-CPU
server.
What the script does is for each line it checks if the line contains
GET request, and if it does - goes through a list of pre-compiled
regular expressions, trying to find a matching one. [...]
Any ideas why in the world it's so slow? I did some research and
couldn't find a lot of info, other than the way I do it pretty much
the way it should be done, unless I'm missing something...
Another, much easier/faster approach, would be:
grep ' GET ' file | your_script.pl
The earlier you can filter out the work that's needed, the better, and you're not going to get much faster than grep. The more refined you
can make that initial filtering of data to only send lines you're
interested in, to your program, the better.
.
- Follow-Ups:
- Re: perl multithreading performance
- From: bugbear
- Re: perl multithreading performance
- References:
- perl multithreading performance
- From: dniq00
- perl multithreading performance
- Prev by Date: Re: perl multithreading performance
- Next by Date: Re: perl multithreading performance
- Previous by thread: Re: perl multithreading performance
- Next by thread: Re: perl multithreading performance
- Index(es):
Relevant Pages
|