Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Maybe this can help you. With a normal Perl thread, create 2 threads, make the 2 thread load 2 pages, let's say www.perlmonks.com, but you need to do all of this loading only 1 time LWP::Simple.
Remember that when you create 2 threads and use LWP::Simple from this 2 threads you are loading LWP::Simple 2 times in the memory since Perl duplicate everything when a thread is created. If you play a while with threads you will see that Perl threads use to much memory, so I can't load more than 10 threads to do a real job. With Delphi for example we can load more than 30 threads and still have a good execution, with Perl if I use more than 8 I start to see the application to be slow! Is more about performance and not what is possible to do. Here's a simple way to do that with Thread::Isolate:
Graciliano M. P. In reply to Re^4: Isolating dynamically loaded modules with Thread::Isolate.
by gmpassos
|
|