httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject Re: Optimizing dir_merge()
Date Thu, 16 Aug 2001 01:08:08 GMT
William A. Rowe, Jr. wrote:

>Here's my take on the dir_merge patch I offered up.  Please review for sanity.
Thanks!  This looks clear and complete to me.

There's one point at the end where I disagree, though it may be due to
a bad assumption on my part.  Here's the item in question:


>Caching Considerations
>The key point within Apache is; a given per-dir config cannot be trusted after a 
>subsequent merge_dir_configs callback in the same pool.
I wouldn't have drawn this conclusion.  If your per-dir config is being 
passed as
the 'base' to a subsequent merge_dir_config callback, it should be 
unharmed afterward
because the callback must treat the base as const.  It's okay for the 
callback to
use a very liberal definition of constness if needed for performance 
reasons; e.g.,
it can increment a reference count in the base in support of 
copy-on-write logic.
But from the perspective of the caller, passing a cached per-dir config 
as the
base to a merge_dir_configs callback shouldn't change the semantics of 
the data
in that per-dir config.

What am I missing?


View raw message