Hello Monks, I have a question about forking processes using the ForkManager module. I'm running a script that will parse a large file, there are about 10,000 of these files. The initial script I wrote forks the process into 15 child processes that parses one of the 10,000 files. It took around 5 days for the code to finish (person running it pauses it sometimes). The code processed 1 file every 1-2 minutes. I'm thinking because ForkManager only creates new processes and does not 'really thread' that the processing time would be the same if I chose not to fork. Is this true? Basically, would it take the same amount of time to parse 10,000 files one by one compared to parsing 15 of them at the same time? I'm asking this and not testing it because I'm writing a code for someone else to run on a computer that I cannot access due to sensitive information. So... yeah Tusen Takk Monks.

In reply to To Fork or Not to Fork. Tis a question for PerlMonks by pimperator

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.