httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [PATCH modules/generators/mod_status.c] performance
Date Fri, 15 Mar 2002 02:49:43 GMT
Jeff Trawick wrote:
> Stas Bekman <stas@stason.org> writes:
> 
> 
>>this patch:
>>- removes if (!short_report) { } condition since the code inside this 
>>  condition is already in the block of the same condition.
>>  + fixed alignment after removing the loop
>>- moves a chunk of code to the condition's:
>>
>>                if (ws_record.access_count != 0 ||
>>                    (   ws_record.status != SERVER_READY   
>>                     && ws_record.status != SERVER_DEAD)) {
>>
>>block, since it was just wasting CPU cycles. Especially if a server has 
>>high server|thread_limit but has just a few threads/procs running.
>>
> 
> maybe since the body of the loop is so darn big it would be clearer if
> the check was:
> 
> +                if (ws_record.access_count == 0 &&
> +                    (   ws_record.status == SERVER_READY
> +                     || ws_record.status == SERVER_DEAD)) {
> +                    continue;
> +                }

yes! I hate multiply nested loops with huge bodies. Go for it Jeff.

-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Mime
View raw message