in reply to Why is LWP::UserAgent so slow?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why is LWP::UserAgent so slow?
by mje (Curate) on Feb 11, 2010 at 09:04 UTC | |
|
Re^2: Why is LWP::UserAgent so slow?
by smetj (Initiate) on Feb 18, 2010 at 19:37 UTC |