Subject: Re: [PATCH 3/5] gitweb: Use nonlocal jump instead of 'exit' in die_error

From: Jakub Narebski <[email-masked]>
Date: Tue, 4 May 2010 13:39:23 +0200

On Sat, 24 Apr 2010, Jakub Narebski wrote:

> Use 'goto DONE' in place of 'exit' to end request processing in
> die_error() subroutine.  While at it, do not end gitweb with 'exit'.
> 
> This would make it easier in the future to add support or improve
> support for persistent environments such as FastCGI and mod_perl.
> It would also make it easier to make use of die_error() as an error
> handler (for fatalsToBrowser).
> 
> Perl 5 allows non-local jumps; the restriction is that you cannot jump
> into a scope.
> 
> Signed-off-by: Jakub Narebski <[email-masked]>
> ---
> This patch is most independent of introducing caching support to
> gitweb, and I think it would be good to have nevertheless.

>>From *very preliminary* benchmarks it looks like this change improves 
gitweb performance for multiple connections when served from mod_perl.

The results of "ab -n 10 -c <X> <URL>", where X = 1, 2, 5, degrades
less with the number of concurrent requests when this patch is applied 
than without this patch.

-- 
Jakub Narebski
Poland