httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: [PATCH] performance fix for mod_include
Date Sat, 10 Nov 2001 05:56:23 GMT
From: "Brian Pane" <>
Sent: Friday, November 09, 2001 11:20 PM

> In mod_include, we use apr_pcalloc to create an include_ctx_t,
> which consists of about 80 bytes of integer and pointer fields
> and a pair of character buffers used to hold strings.  Each
> of the character buffers is 8KB...
> calloc'ing all this space accounts for about 9% of the total
> usr-mode CPU time in the httpd.
> This patch zero-fills just the integer and pointer fields in
> the structure, plus the first byte of each of the string buffers.
> With the patch, I'm seeing a 19% improvement in SSI throughput
> in informal testing (ab running a single request at a time,
> over the loopback on Linux).

+1... but I do question the size of those buffers... they seem
inordinately large and wasteful.  If we have an error, why not
simply a char* that can be alloc'ed once needed?

View raw message