]> granicus.if.org Git - apache/commitdiff
Optimization for core_output_filter: if the iovec is full,
authorBrian Pane <brianp@apache.org>
Tue, 27 Nov 2001 06:35:29 +0000 (06:35 +0000)
committerBrian Pane <brianp@apache.org>
Tue, 27 Nov 2001 06:35:29 +0000 (06:35 +0000)
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

server/core.c

index b34f7a2af7e969ce5adc6c161e1a0ffafc411b8d..af47d7e0c0f35158904b6a48bb96b2004affe139 100644 (file)
@@ -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) {