Justin Erenkrantz wrote:
On Fri, Apr 15, 2005 at 10:09:39AM -0700, Justin Erenkrantz wrote:

This would save us from the extra round trip.  I'm not sure where else we
could even place such a check besides ap_pass_brigade.  -- justin


Thinking about this a little bit more:

There's no reason we couldn't do the following in ap_http_header_filter:

1. If ap_set_keepalive() decides to enable keepalive (AP_CONN_KEEPALIVE),
add a 'pipeline keepalive check' output filter as the last request-level
filter.
2. This pipeline check simply passes through all data until it sees an EOS.
If it sees an EOS, then it knows that the request is done and that it
should perform the nonblocking read(). If there is no data, then it adds a FLUSH bucket. In all cases, it'd strip the EOS from the brigade.


One nice side effect of this is that we could remove the annoying EOC bucket
convention and go back to EOS meaning 'close' to connection-level filters.

I'll let the bucket meisters comment on this.

What do you think? -- justin

it is sounding better all the time as far as performance. if I understand you correctly I think this one eliminates the extra trips down the input and output filter chains. but unfortunately we still have the extra read() compared to 1.3, and what about data stashed in the input filter chain?


Greg



Reply via email to