swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit 5de7250197a722d8e898723525fe578d73314d16
parent 6121b3b37d06a24c980e63965e5545c1f182273a
Author: uriel@engel.se.cat-v.org <unknown>
Date:   Fri,  9 Jan 2009 02:06:41 +0100

Awk_buffer does seem to improve things a bit, but changed the buffer side to an empirically determined value.
Diffstat:
Mbin/cgilib.rc | 4++--
Mbin/werc.rc | 1-
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/bin/cgilib.rc b/bin/cgilib.rc @@ -39,11 +39,11 @@ fn get_post_args { } } -# 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 = "" } diff --git a/bin/werc.rc b/bin/werc.rc @@ -241,7 +241,6 @@ if(! ~ $#debug 0) 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>' }