mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
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.
This commit is contained in:
parent
a6b1b27aad
commit
998191fd4f
2 changed files with 3 additions and 5 deletions
|
@ -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 ()
|
||||
|
|
|
@ -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 ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue