httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch>
Subject Re: Removing ap_old_write_filter
Date Fri, 25 Mar 2011 21:30:26 GMT
On Friday 25 March 2011, Dan Poirier wrote:
> I propose to remove ap_old_write_filter from trunk.
> I recently noticed that buffer_output(), which is apparently
> intended to buffer data in a brigade to be passed down the output
> filter chain later by ap_old_write_filter, calls the ap_fwrite()
> macro to do so, which always flushes the data.  So no data has
> been getting buffered.  This has been the case for at least 10
> years and back to Apache 2.0.x, which is as far back as I cared to
> check.
> We could fix buffer_output() to save up the data in a brigade
> without flushing it, as was apparently intended, but would that
> break any module that has been (inadvertently) relying on
> buffer_output() to flush its data?  Of the modules that use
> ap_rwrite and related APIs that end up calling buffer_output(),
> very few ever call ap_rflush.
> On the other hand, fixing the buffering might buy us some
> performance, as long as we're willing to fix any modules that get
> broken.
> Thoughts?

Are you sure that ap_fwrite does not buffer? It calls 
apr_brigade_write(), which, according to the apr-util docs, should 
only flush if "the brigade is full".

Also, I reworked buffer_output some time back (r821471) and I think 
that I have tested it then and it worked. But it's too long ago to be 

IIRC, mod_php uses ap_rwrite and ap_rflush extensively. Therefore I 
would be against removing them unless there was a very good reason.

View raw message