summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-12-12 23:33:33 +0100
committerAndy Wingo <wingo@pobox.com>2010-12-12 23:34:18 +0100
commit998191fd4f4b82d7ee8f40ecdb4db4187864c33e (patch)
tree3f2740ad0cafff086278db2b0a69fc941830e7d8
parenta6b1b27aad9072945cfa1cde908325f506c015b9 (diff)
downloadguile-998191fd4f4b82d7ee8f40ecdb4db4187864c33e.tar.gz
fix testing code in web/server
* module/web/server.scm (call-with-encoded-output-string): Fix some code I accidentally left in while testing. Re-tested the difference in speed; pleasantly surprised. * module/web/uri.scm: Make the same change here.
-rw-r--r--module/web/server.scm4
-rw-r--r--module/web/uri.scm4
2 files changed, 3 insertions, 5 deletions
diff --git a/module/web/server.scm b/module/web/server.scm
index 3d7c41103..6d3d941c2 100644
--- a/module/web/server.scm
+++ b/module/web/server.scm
@@ -152,9 +152,9 @@
(values #f #f #f))))
(define (call-with-encoded-output-string charset proc)
- (if (and (string-ci=? charset "utf-8") #f)
+ (if (string-ci=? charset "utf-8")
;; I don't know why, but this appears to be faster; at least for
- ;; examples/debug-sxml.scm (650 reqs/s versus 510 reqs/s).
+ ;; examples/debug-sxml.scm (1464 reqs/s versus 850 reqs/s).
(string->utf8 (call-with-output-string proc))
(call-with-values
(lambda ()
diff --git a/module/web/uri.scm b/module/web/uri.scm
index 86b93d57f..7a82f0f3d 100644
--- a/module/web/uri.scm
+++ b/module/web/uri.scm
@@ -218,9 +218,7 @@
(define (call-with-encoded-output-string charset proc)
- (if (and (string-ci=? charset "utf-8") #f)
- ;; I don't know why, but this appears to be faster; at least for
- ;; examples/debug-sxml.scm (650 reqs/s versus 510 reqs/s).
+ (if (string-ci=? charset "utf-8")
(string->utf8 (call-with-output-string proc))
(call-with-values
(lambda ()