Replace fprintf with explicit display for performance.
Replace fprintf with explicit display for performance.
This commit is contained in:
parent
741be85f07
commit
fb3a95f9d5
|
@ -135,8 +135,12 @@
|
||||||
(display name out)
|
(display name out)
|
||||||
; Write attributes
|
; Write attributes
|
||||||
(for ([att (in-list attrs)])
|
(for ([att (in-list attrs)])
|
||||||
(fprintf out " ~a=\"~a\"" (car att)
|
(display " " out)
|
||||||
(escape (cadr att) escape-attribute-table)))
|
(display (car att) out)
|
||||||
|
(display "=" out)
|
||||||
|
(display "\"" out)
|
||||||
|
(display (escape (cadr att) escape-attribute-table) out)
|
||||||
|
(display "\"" out))
|
||||||
; Write end of opening tag
|
; Write end of opening tag
|
||||||
(if (and (null? content)
|
(if (and (null? content)
|
||||||
(let ([short (empty-tag-shorthand)])
|
(let ([short (empty-tag-shorthand)])
|
||||||
|
@ -159,9 +163,13 @@
|
||||||
(display (escape x escape-table) out)]
|
(display (escape x escape-table) out)]
|
||||||
; Entities
|
; Entities
|
||||||
[(symbol? x)
|
[(symbol? x)
|
||||||
(fprintf out "&~a;" x)]
|
(display "&" out)
|
||||||
|
(display x out)
|
||||||
|
(display ";" out)]
|
||||||
[(valid-char? x)
|
[(valid-char? x)
|
||||||
(fprintf out "&#~a;" x)]
|
(display "&#" out)
|
||||||
|
(display x out)
|
||||||
|
(display ";" out)]
|
||||||
; Embedded XML
|
; Embedded XML
|
||||||
[(cdata? x)
|
[(cdata? x)
|
||||||
(write-xml-cdata x 0 void out)]
|
(write-xml-cdata x 0 void out)]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user