httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [PATCH modules/generators/mod_status.c] performance
Date Thu, 14 Mar 2002 17:41:11 GMT
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;
+                }

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...


Mime
View raw message