What makes me curious is the difference you see when
you stop using CGI.pm. I realize this won't translate to the
full-blown handler version of the script, but did you try loading CGI.pm
via default in mod_perl, or did you have
Yeah, I would be interested in this too. Is CGI.pm being used from within a test script, or from startup.pl/httpd.conf? You could also try only importing things like use CGI qw/:standard/. I believe CGI.pm has some magic code inside to help with memory when you do so, although I haven't perused the source in quite some time now. Either way, if CGI.pm is being preloaded I wouldn't think you would see as much of a hit, since it stays resident in memory and isn't loaded each time the script is called.
There's a huge performance difference between
use CGI and use CGI qw(:standard) because the latter
has to make 150 or so symbols through an import, where the former
simply loads the "lincoln loader" selfloader and compiles subroutines as needed.