You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Kai-Uwe Rommel <Ka...@ARS.de> on 2001/03/07 19:39:25 UTC

Re: [PATCH] Fixes for PR#4468 and PR#5997 - Was: Re: FW: mod_proxy/5997: ProxyCacheGarbageCollection did not work - I fixed it


"William A. Rowe, Jr." <wr...@rowe-clan.net> wrote on 7.3.2001 16:25:14:
>
>   Suggestion, first can you rediff in unidiff format (-u3)?  That's the
format that
> most httpd folks read fluently.  And then post this up to
new-httpd@apache.org with a
> brief comment on what it accomplishes and why [yes, I know what it
does.]  And be sure
> to fix one minor nit, /* struct dirent - same as Unix */ is no longer
same as
> Unix :-)

Ok, done. In addition, I made the change now relative to 1.3.19 instead
of the 1.3.14 code for the context diff I sent you earlier today.

This change should improve proxy cache garbage collection performance
on Win32.

For each and every file checked during garbage collection the current
code makes an additional stat() call just to determine if the file is
a directory or indeed a file. But the information about the type (file
or directory) was already read into memory with readdir().

So what the code change does: it caches the attribute word in the struct
dirent for each file and then uses it later to omit the expensive extra
stat() call.

Kai Uwe Rommel

--
/* Kai Uwe Rommel                      ARS Computer & Consulting GmbH *
 * rommel@ars.de (http://www.ars.de)                Muenchen, Germany *
 * rommel@leo.org (http://archiv.leo.org/pub/comp/os/os2 maintenance) */


(See attached file: apache_1319_win32.diff)