> > Yes. Because you have a lot of modules loaded, Perl needs to copy a
> > lot. The "fast" times, Perl can do this in RAM. The "slow" times the
> > OS is probably is swapping memory to disk when Perl is asking for more
> > memory to copy the thread.
> >
> > It's a threshold problem. Once you're over it, you're in trouble.
>
>
> Yes could be! I'll keep my eyes on the memory.
>
> But in that case wouldn't there be cases where the creation of the first
> threads would be quick and then when a memory limit is reached, the rest
> is slow??
> I my case it is either a quick start for all 6 treads or all of them
> takes 30 seconds each.
>
I'm not sure how tracing programs work with threaded programs, but if you're
on a Linux box, you might want to try strace ("strace threaded-script.pl),
or for Solaris (and others) truss. If you're on a Windows box, um, er,
there's probably something to do the same thing.
If you're unfamiliar with these tools, they basically start the program in
question, and then show you all the system calls that are being made. It may
help you to see what's going on behind the scenes.
Paul Archer