in reply to Re: Re: Memory Use and/or efficiency passing scalars to subs
in thread Memory Use and/or efficiency passing scalars to subs
So, I am looking to speed things up.
You are almost certainly barking at the wrong tree.
You seem to be assuming that passing/copying large scalars makes much difference to runtime. Memory use sure. Runtime - not really, only if you get into swap.
I will almost guarantee you that 99% of your runtime is spent in LWP - getting (waiting) the data.
I would suggest Benchmarking before you try to optimise an area that probably has nothing at all to do with your speed issue.
Assuming that I am right the easiest practical solution is to split your code into GET and a MUNGE units - this also makes the Benchmark a breeze. Anyway you will typically want to run 10-100 parallel LWP agents to pull down data as fast as your bandwidth/the target servers will deliver it. LWP::Parallel::UserAgent will probably be a lot more useful than LWP::Simple. Note don't accidentally implement a DOS attack on your target servers. First it is not nice. Second, some firewall implementations will lock your Agent/IP out if you hit it too hard.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Memory Use and/or efficiency passing scalars to subs
by Anonymous Monk on Aug 31, 2003 at 15:04 UTC | |
by knexus (Hermit) on Aug 31, 2003 at 15:12 UTC | |
by tachyon (Chancellor) on Sep 01, 2003 at 00:42 UTC |