laziness, impatience, and hubris | |
PerlMonks |
Re: Process file simultaneously after forkingby bheckel (Beadle) |
on Nov 14, 2002 at 21:26 UTC ( [id://213021]=note: print w/replies, xml ) | Need Help?? |
Great advice. Thanks everyone for taking the time to reply. What I'm doing with each line (8,000 line file) involves querying a database then doing a fuzzy string match for each returned record against my string. I've tried the split file approach but I end up with almost the same total run time as without forking. I'm guessing it's because I can't divide the file evenly (some strings are more difficult to process) so either the parent or child finishes while the other is working away at the harder matches. I need the first one that finishes to keep working. So iburrell's non-blocking IO in the parent idea might be my next attempt. Bob
In Section
Seekers of Perl Wisdom
|
|