Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: How to speed up/multi thread extract from txt files?by KurtSchwind (Chaplain) |
on Jan 09, 2008 at 03:05 UTC ( [id://661235]=note: print w/replies, xml ) | Need Help?? |
You don't mention which OS you are on. If you are on a *nix box you can use split. Split the file into equal parts and just run multiple instances of your application. At least that's one way. However, have you considered that the extraction process isn't actually what needs optimizing? If you are running through a list of regex on each line, I'd hazard a guess that that is consuming more of your time than reading each line in. It might help if you'd post some of your code so we can take a gander and see where your bottleneck is.
-- I used to drive a Heisenbergmobile, but every time I looked at the speedometer, I got lost.
In Section
Seekers of Perl Wisdom
|
|