gitweb: provide fallback pure perl FastCGI implementation
When running gitweb.cgi, there's a substantial time penalty on each
initial startup of the perl script -- it's a very large script and,
in addition, it then performs some once-at-startup initialization.
In order to deliver decent performance, it's imperative that the
gitweb.cgi perl script be able to run in FastCGI mode if at all possible.
To this end, include an alternative pure perl implementation of
the FastCGI specification that will automatically be used if either
(or both) of the CGI::Fast or FCGI modules are not present.
The pure perl FastCGI implementation may not be quite as fast as
the native FCGI module, but using the pure perl version delivers
far better responsiveness when the native FCGI module is not available
than falling back to a non-FastCGI mode does.
Update the check-perl-modules.pl warning messages to indicate when
this will happen.
No changes are required to gitweb.cgi, the magic happens in the
`gitweb_config.perl` file that it includes and Girocco provides.
When gitweb.cgi attempts to use CGI::Fast/FCGI (which it only does
if it's been configured to run in FastCGI mode), the extra code
that's been added to `gitweb_config.perl` checks to see whether or
not both the CGI::Fast and FCGI modules are present and if not
automatically uses the substitute pure perl FastCGI implementation
instead.
With this support in place, the only factor limiting use of the
FastCGI mode becomes whether or not the web server software itself
supports FastCGI. Most of the web server software available does.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>