I just got a task of gathering content from 32K+ URLs from one of our customer's sites.

My first pass was quick 'n dirty, running single-threaded using LWP::UserAgent, and took over seven hours.

Now that I've got a chance to do some additional coding, I want to change to some sort of parallel gets.

For other tasks I tried using LWP::Parallel, but didn't see a huge speed-up.

As a different task I wrote some parallel gets using threads, which seemed to scale well and ran faster, but that warning that threads isn't ready for prime-time use when I build Perl always makes me nervous.

I looked at POE, but haven't built anything significant. It seems like it's more than adequate for the task, but, at the same time I feel like it's the elephant-gun approach - way too much for what should be a simple task of walking a list of URLs.

I'm leaning towards resurrecting my threads + LWP::UserAgent code because it seemed to be robust and fast(er).

What are the thoughts from the collective mind here about LWP::UserAgent and threads vs. LWP::Parallel vs. POE. And, is there something I might have missed?

Thanks.


In reply to running multiple LWP gets by gferguson

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.