Thanks Liz, good article, but I didn't find an explanation to my problem!?!
To explain my problem a little bit more: It is exactly the same threaded program running on the same data that sometimes take 4 seconds to start, and sometimes 3 minutes! The threading takes place in the beginning of the program and always in the same way.
Is there any logical reason to way each thread is created in a fraction of a second during one start of the program and then each takes 30 seconds at another start of the program. Never in between - its either very quick or very slow!
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.
Liz
