httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject [PATCH] performance fix for mod_include
Date Sat, 10 Nov 2001 05:20:23 GMT
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).


View raw message