SPUG: Is there some other recommended replacement for CGI.pm with Apache2?

O'neil, Jerome joneil at cobaltgroup.com
Thu Sep 18 13:14:55 CDT 2003


> I don't know if this is what Adam meant by "resource waster", or what
Jerome meant by 
> "isn't nearly the monster that it's reputed to be", but it's a complaint
that I've heard 
> many times, namely, loading 'that huge beast into my simple form script
will slow the 
> whole server'.

That sums it up quite nicely.  CGI.pm is a large module, to be sure, but
most of that is pod, and the remainder of the compilation is deferred until
the methods are called.

Here is a simple test.

%time perl -M"CGI qw(-no_debug)" -e 'my $c = new CGI'
0.08 user 0.07 system 0:00.16 elapsed.

If you use the function oriented interface, i.e. use CGI qw(:all),  it can
be a bit slower, but still, not nearly the beast it's reputed to be.

HTH!

-J





This e-mail transmission contains information intended only for the use of
the recipient(s) named above. Further, it contains information that may be
privileged and confidential. If you are not the intended recipient, you are
hereby notified that any dissemination, distribution, or copying of this
message (including any attachments) is strictly prohibited. If you have
received this e-mail in error, please notify the sender by reply e-mail and
then delete this message from your mail system. Thank you for your
compliance.



More information about the spug-list mailing list