http://qs1969.pair.com?node_id=649497


in reply to How to Fix CGI

Hmm, I'm doubtful. AFAICS the assumption he makes is that simply having a persistent perl interpreter in memory, which loads scripts and modules at runtime, will save a lot of time and processing power. I don't think that assumption is correct. Try this in your shell:

sh-3.1$ time perl -e '' real 0m0.005s user 0m0.000s sys 0m0.000s sh-3.1$ time perl -MCGI::Simple -e '' real 0m0.026s user 0m0.020s sys 0m0.000s

Loading the perl interpreter, compiling and executing the noop takes 0.005 seconds, whereas doing the same and loading the CGI::Simple module takes more than five times as long (you can try this with CGI as well, but that's a little unkind ;-). His proposition would only manage to save a small part of the 0.005 seconds, namely the time it takes the OS to fork and start a new process and load the perl interpreter into memory. So I may have some flaw in my thinking here (in which case I'd be thankful if someone more knowledgeable than me could point it out), but I just don't see the point of his mod_perllite.

Caveat: above is on Linux, things may be very much different on fork-challenged platforms ;-).


All dogma is stupid.