in reply to Using LWP::Parallel
I've never used LWP::Parallel, but after a quick glance at the docs (the concept intrigues me) I notice this method for LWP::Parallel::RobotUA ...
but that's not quite what we're looking for.$pua->max_req ( 2); # max parallel requests per server
I can't for the life of me see anything obvious here.
I would guess you could do this by only registering
10 URLs at a time, getting them in parrallel, then
registering another 10, etc. But this is wastefull of
cycles. Some URLs will finish faster then others, but
you're wiating for all 10 before proceeding to #11.
(I would guess there is a better way)
UPDATE: LWP::Parallel::UserAgent also seems to have a max_req method, as well as a max_hosts method -- so if you know that all of your URLs wer for different hosts, OR were all for the same host, you could use one of them to get your result, but i still don't see anyway to optimally fetch no more then 10 URLs a time without any pre previous knowledge of your URLs. method
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using LWP::Parallel
by mugwumpjism (Hermit) on Mar 11, 2002 at 19:44 UTC | |
by hossman (Prior) on Mar 11, 2002 at 20:33 UTC | |
by mugwumpjism (Hermit) on Mar 12, 2002 at 20:13 UTC |