|
|
| P is for Practical | |
| PerlMonks |
Slow HTTP::Async responsesby alexkus (Initiate) |
| on Feb 14, 2013 at 10:28 UTC ( #1018717=perlquestion: print w/ replies, xml ) | Need Help?? |
|
alexkus has asked for the
wisdom of the Perl Monks concerning the following question:
Hello. Trying to use HTTP::Async to do some concurrent downloading, but it seems to take much longer than a traditional HTTP request made with LWP::UserAgent. Minimal code below. I do a grab of a URL (I've replaced my internal URLs with a URL from the BBC website). When I run it I get:-
So the first attempt (via LWP) completes in a fraction of a second. The subsequent request (using HTTP::Async) takes 11 seconds or so. Looking at the tcpdump of the requests being sent I can't really see any difference between the two. And both are made by the same call to HTTP::Request anyway. Code follows:-
Any ideas?
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||