From: Brian Pane Date: Tue, 27 Nov 2001 06:35:29 +0000 (+0000) Subject: Optimization for core_output_filter: if the iovec is full, X-Git-Tag: 2.0.29~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ac8cb48421dfd76510441728bd9f4049522b1f1;p=apache Optimization for core_output_filter: if the iovec is full, don't try to concatenate buffers if we already have at least 8KB of data ready to send. Instead, just split the brigade and send what's currently in the iovec. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92196 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index b34f7a2af7..af47d7e0c0 100644 --- a/server/core.c +++ b/server/core.c @@ -3081,6 +3081,13 @@ static apr_status_t core_output_filter(ap_filter_t *f, apr_bucket_brigade *b) apr_bucket *temp, *next; apr_bucket_brigade *temp_brig; + if (nbytes >= AP_MIN_BYTES_TO_WRITE) { + /* We have enough data in the iovec + * to justify doing a writev + */ + more = apr_brigade_split(b, e); + break; + } temp_brig = apr_brigade_create(f->c->pool); temp = APR_BRIGADE_FIRST(b); while (temp != e) {