If I write a bash script which iterates 100 times over both scripts I get following results:
You comparing not just the times of sending request, but also the times of scripts compiling. First script imports LWP and JSON, and second only JSON. Look onto my test results:
$ time (for i in `seq 1 100`; do perl -MJSON -e1; done) real 0m2.635s user 0m1.930s sys 0m0.510s $ time (for i in `seq 1 100`; do perl -MJSON -MLWP::UserAgent -e1; don +e) real 0m7.111s user 0m6.060s sys 0m0.740s
In reply to Re: Why is LWP::UserAgent so slow?
by zwon
in thread Why is LWP::UserAgent so slow?
by smetj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |