in reply to Process file simultaneously after forking

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
  • Comment on Re: Process file simultaneously after forking