If as you say you _need_ to get pages sequentially then threading appears pointless as the vast majority of the time will be taken getting the data, not processing it. It usually takes 2-4 seconds to get a page. The quantity of processing you can do in this sort of time is huge. I would be extremely suprised if the processing time was more than a few % of the total runtime with the rest of the time simply waiting on the socket for data. You are into much more fruitful territory if you can avoid a sequential get and do at least part of the getting in parallel. Or to put it another way the bottleneck is almost certainly the getting, not the processing. Optimisation that does not affect bottleneck points is pretty much a waste of time.

I suggest you prove that there is any benefit to be gained ie processing takes a significant % of the runtime before you waste your time producing the right solution to the wrong problem.

cheers

tachyon


In reply to Re: ithreads weren't the way.. still searching by tachyon
in thread ithreads weren't the way.. still searching by hlen

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.