Hello everyone,
I was just curious how LWP::Parallel::UserAgent (LWP::PUA) compares
against Parallel::ForkManager
in terms of speed.
For LWP::PUA, I have used what I think are optimal settings:
my $pua = LWP::Parallel::UserAgent->new();
$pua->in_order (0); # handle requests in order of registration
$pua->duplicates(0); # ignore duplicates
$pua->timeout (0); # in seconds
$pua->redirect (0); # follow redirects
File Output was tested for both modules and only 8 urls were used for
testing.
Parallel::ForkManager with LWP::Simple seemed to be slower than
LWP::PUA by about 3 seconds.
Parallel::ForkManager with system("curl -s 'http://www.perl.com' >
'perlcom.html'") seemed to be
slower than LWP::PUA by about 1 second.
...and now the questions:
Are 8 urls enough for Benchmarking purposes?
Does LWP::PUA use Forking or Threads?
Thanks in advance.
-gohaku
|