shithub: werc

Download patch

ref: 2f73d1ccfe941f89ddb254d6fe4f094837d03309
parent: fc6cf885e3280aa017d25af2931c545cb8e60e02
author: uriel <uriel@engel.se.cat-v.org>
date: Thu Jan 8 21:06:41 EST 2009

Awk_buffer does seem to improve things a bit, but changed the buffer side to an empirically determined value.

--- a/bin/cgilib.rc
+++ b/bin/cgilib.rc
@@ -39,11 +39,11 @@
     }
 }
 
-# Is this really useful?
+# This seems slightly improve performance, but might depend on httpd buffering behavior.
 fn awk_buffer {
     awk '{
         buf = buf $0"\n"
-        if(length(buf) > 8192) {
+        if(length(buf) > 1400) {
             printf "%s", buf
             buf = ""
         }
--- a/bin/werc.rc
+++ b/bin/werc.rc
@@ -241,7 +241,6 @@
 master_template=`{get_lib_file $master_template}
 
 if(~ $response_format html) {
-    # Is awk_buffer really useful?
     template $headers $master_template | awk_buffer
     echo '</body></html>'
 }