Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: Speeding things up -- LWP::Parallelby mr_ron (Chaplain) |
on Apr 30, 2018 at 00:48 UTC ( [id://1213776]=note: print w/replies, xml ) | Need Help?? |
I don't have much experience with Mojo::UserAgent, but the Mojo Cookbook has examples for both non-blocking and blocking concurrency. For a simple test I got blocking concurrency with promises working. I built a small test server to avoid any webmaster complaints and easily read and did a little parsing on about 100 fetched URLs per second. I put a 1 second delay into page delivery and performance seemed to depend on web server configuration. To get good performance I configured for 100 workers restricted to 1 connection each. So with a server named dos-serve-sp.pl I ran:
Test server:
Test client with blocking concurrency from promises:
Ron
In Section
Seekers of Perl Wisdom
|
|