httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject [PATCH] mod_mime pool testing against cvs head
Date Thu, 16 Aug 2001 21:54:37 GMT
> Now, this is a far as I can take it.  Segfaults (from the hash _and_ the elements)
> should be gone.  I don't have the time or energy to focus on the optimization patch 
> to reflect this last update, especially as exactly one (1) individual has commented
> on the 'optimization guideslines' draft I posted.

Ok... last chance.  Here's the optimized patch against the current tree.

Anyone who suggests this adds wicked complexity is fooling themselves, it's no more
nasty than actually assuring that your hash table or elements aren't being corrupted.

I'm also cheating, using the apr_hash_pool_get() accessor rather than wasting a pool
pointer in the dir_config.

To Brian's well thought out question; yes, if you save three snapshots while building
a dir_config, let's say the /, /foo/ and /foo/bar/ points, you must actually create
three sub-pools (each a sub pool of the prior pool, most likely.)  Since you may likely
ditch /foo/bar/, or even /foo/, before / becomes stale (let's say you detected an
.htaccess change), this sub pool requirement certainly isn't unreasonable.  You can
then destroy the /foo/bar/ pool and reclaim the memory, while building a new subpool
of the /foo/ point, and pick up your walk again from /foo/ :)  

Feel free to benchmark and vote it up or down, on performance alone.  Bill was right,
the /www/www.apache.org/dist tree provides a very nice performance measure and
diagnostic example for complex sites :)

Bill


Mime
View raw message