httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai-Uwe Rommel" <>
Subject Re: [PATCH] Fixes for PR#4468 and PR#5997 - Was: Re: FW: mod_proxy/5997: ProxyCacheGarbageCollection did not work - I fixed it
Date Wed, 07 Mar 2001 18:39:25 GMT

"William A. Rowe, Jr." <> 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 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 *
 * (                Muenchen, Germany *
 * ( maintenance) */

(See attached file: apache_1319_win32.diff)
View raw message