httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [Patch] Async write completion for the full connection filter stack
Date Mon, 08 Sep 2014 13:50:46 GMT
This is pretty cool... haven't played too much with it, but
via inspection I like the implementation.

One question:

===================================================================
--- server/util_filter.c	(revision 1622873)
+++ server/util_filter.c	(working copy)
@@ -566,6 +566,16 @@
 {
     if (next) {
         apr_bucket *e;
+        unsigned int activity;
+        int empty = APR_BRIGADE_EMPTY(bb);
+        apr_status_t status;
...
+        while (APR_SUCCESS == status && empty) {
+            next = next->next;
+            if (next && next->c->activity == activity) {
+                status = next->frec->filter_func.out_func(next, bb);
+            }
+            else {
+                break;
+            }
+        }
+
+        return status;

Why does while check for empty? Wouldn't it be faster to
wrap that while in a 'if (empty)' ? It would safe an
addition check on a var that doesn't change on each loop
thru the while().

Mime
View raw message