You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Stoddard <bi...@wstoddard.com> on 2001/07/11 06:43:48 UTC

Re: [PATCH] Re: performance of mod_mime

Brian,
Committed your most recent revision of this patch. Please review it as I had to hand merge about
half of the chunks. You should consider Dean's suggestions as well.

Bill

> Here's my proposed patch that replaces the tables with a hash table.
> --Brian
>
> Roy T. Fielding wrote:
>
> >On Thu, Jun 21, 2001 at 02:21:11PM -0700, Brian Pane wrote:
> >
> >>I spent some time recently profiling the latest 2.0 httpd source with gprof.
> >>One surprising bottleneck that showed up in the results was the find_ct
> >>function in mod_mime, which spends a lot of time in apr_table_get
> >>calls.  Using the default httpd.conf, the tables for languages and
> >>charsets are somewhat large, so the time spent scanning them on each
> >>request is significant.
> >>
> >>It looks straightforward to fix this by replacing the tables with hash
> >>tables.
> >>Is anybody working on this already?  If not, I'm willing to contribute a
> >>patch if there's interest.
> >>
> >
> >Sounds like a great idea to me.  I was thinking of doing the same with
> >methods and header fields, but have no time to do it myself.
> >
> >....Roy
> >
> Index: mod_mime.c
> ===================================================================



Re: [PATCH] Re: performance of mod_mime

Posted by Brian Pane <bp...@pacbell.net>.
Thanks!  I checked the one in CVS against my working copy, and
the only differences are tabs vs spaces, so what's in CVS is the
correct code.  (Sorry about the broken patch; there were tabs
in the original, and they got converted to spaces when I cut and
pasted the patch into an email.)
--Brian


Bill Stoddard wrote:

>Brian,
>Committed your most recent revision of this patch. Please review it as I had to hand merge about
>half of the chunks. You should consider Dean's suggestions as well.
>
>Bill
>
>>Here's my proposed patch that replaces the tables with a hash table.
>>--Brian
>>
>>Roy T. Fielding wrote:
>>
>>>On Thu, Jun 21, 2001 at 02:21:11PM -0700, Brian Pane wrote:
>>>
>>>>I spent some time recently profiling the latest 2.0 httpd source with gprof.
>>>>One surprising bottleneck that showed up in the results was the find_ct
>>>>function in mod_mime, which spends a lot of time in apr_table_get
>>>>calls.  Using the default httpd.conf, the tables for languages and
>>>>charsets are somewhat large, so the time spent scanning them on each
>>>>request is significant.
>>>>
>>>>It looks straightforward to fix this by replacing the tables with hash
>>>>tables.
>>>>Is anybody working on this already?  If not, I'm willing to contribute a
>>>>patch if there's interest.
>>>>
>>>Sounds like a great idea to me.  I was thinking of doing the same with
>>>methods and header fields, but have no time to do it myself.
>>>
>>>....Roy
>>>
>>Index: mod_mime.c
>>===================================================================
>>
>
>
>