httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: How to achieve zero-copy when reading request headers?
Date Mon, 01 Jul 2002 07:10:26 GMT
On Sun, 30 Jun 2002, Justin Erenkrantz wrote:

> Yet, my real desire here is to figure out how to make brigade creation
> and destruction faster.  I think the problem is that pool cleanup
> registration and destruction is *very* slow.  So, perhaps, that'd
> be the place to focus on if we're concerned that brigades are just
> too expensive.

Note that the brigade destruction can be skipped completely in
performance-critical situations; the cleanup will destroy the brigade (and
all buckets in it) when its pool goes away.  Of course, that means that
you're keeping all those buckets around until the pool (probably r->pool)
goes away, which you might not want to do.  If that is a problem, you can
use apr_brigade_cleanup() rather than apr_brigade_destroy(), which will
destroy the buckets but not deregister the brigade cleanup.  That means a
little pointless work at r->pool cleanup time, but it saves you a call to
apr_pool_cleanup_kill() in the performance-critical section, which could
be a significant savings in some cases.

--Cliff


Mime
View raw message