Thanks for the insight -- I knew that BEGIN happened pre-compile, but I somehow wasn't connecting that with the module compilation.
Anyway, I waited for another slow-time and tried the CGI again with different modules commented out, and narrowed it down to one module that seems to be the culprit.
Now I just need to spend some time looking at the module to figure out why it sometimes takes so long to compile or initialize. A cursory glance showed that the module doesn't do much initialization (all of the logic is in the subs), except for setting some scalars to string values.
The entire filesystem is stored locally (on a RAID array), so IO speed shouldn't be a factor. CPU or RAM might be a culprit -- our performance monitor doesn't show anything above 40%, but I suppose there could be mini-spikes that are shorter than the measurement period.
In reply to Re: Re: Long delay at end of BEGIN block
by mcm
in thread Long delay at end of BEGIN block
by mcm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |