httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <>
Subject Re: cvs commit: httpd-2.0/modules/http mod_mime.c
Date Wed, 15 Aug 2001 21:21:17 GMT wrote:
> wrowe       01/08/14 20:09:33
>   Modified:    modules/http mod_mime.c
>   Log:
>     Solve the segfault until the right patch is unearthed.
>     [Greg Ames]
>   Revision  Changes    Path
>   1.51      +4 -4      httpd-2.0/modules/http/mod_mime.c
>   Index: mod_mime.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/modules/http/mod_mime.c,v
>   retrieving revision 1.50
>   retrieving revision 1.51
>   diff -u -r1.50 -r1.51
>   --- mod_mime.c        2001/08/14 02:35:55     1.50
>   +++ mod_mime.c        2001/08/15 03:09:32     1.51
>   @@ -220,13 +220,13 @@
>        attrib_info *suffix;
>        if (base->extension_mappings && add->extension_mappings) {
>   -        if (base->copy_mappings)
>   -            new->extension_mappings = base->extension_mappings;
>   -        else {
>   +        /* XXX: Greg Ames' fast hack to always copy the hash.
>   +         * It's incomplete, and slower than tables, 

slower doing directory merges during config file parsing perhaps (who
cares?), but faster while serving most requests due Brian's hash stuff.  

The config can be dynamically updated during request/subrequest
processing due to .htaccess files or <File *.asc> containers, maybe a
few other cases.  You want to avoid .htaccess anyway for fastest
performance (see if you're
not convinced).  Plus, it seems like whenever the config is being
updated dynamically, there won't be a whole lot of cases where we don't
need a new copy of the hash table.

Brian's suggestion to cache the results of directory merges sounds like
a more general solution to the problem, assuming there really is a
problem.  Have directory merges actually shown up on the radar screen
while doing profiling?


p.s. if somebody wants to make autoindexes run a lot faster (not sure I
care), why don't we cache which icon to present for a given file?  I
mention autoindexes because that's what triggered this bug.

On daedalus, that ends up driving mod_mime_magic for many files every
single time a browser accesses a distribution directory.  This generates
tons of overhead, including gunzip'ing at least part of every .gz file
in the directory.  I suppose we should try to shake out bugs in m_m_m,
but we can do that without constantly driving it to choose the autoindex

View raw message