improve speed of writing long byte strings with lots of escapes in WXME
svn: r15822
This commit is contained in:
parent
0796519b44
commit
a12ec5fd23
|
@ -712,7 +712,7 @@
|
|||
(let lloop ([amt (min 50 remain)][retry? #t])
|
||||
(let ([s (open-output-bytes)])
|
||||
(write (subbytes orig-s offset (+ offset amt)) s)
|
||||
(let* ([v (get-output-bytes s)]
|
||||
(let* ([v (get-output-bytes s #t)]
|
||||
[len (bytes-length v)])
|
||||
(if (len . <= . 71)
|
||||
(if (and (len . < . 71)
|
||||
|
@ -723,7 +723,7 @@
|
|||
(send f write-bytes #"\n ")
|
||||
(send f write-bytes v)
|
||||
(loop (+ offset amt) (- remain amt))))
|
||||
(lloop (sub1 amt) #f)))))))
|
||||
(lloop (quotient amt 2) #f)))))))
|
||||
(send f write-bytes #"\n)")
|
||||
(set! col 1))
|
||||
|
||||
|
|
|
@ -712,8 +712,8 @@
|
|||
(bytes-append
|
||||
#"\n3 2.0 3 #\"hi\\0\"\n3 #\"bye\"\n80\n"
|
||||
#"(\n"
|
||||
#" #\"0123456789abcdefghij0123456789ABCDEFGHIJ0123456789abcdefghij0123456\"\n"
|
||||
#" #\"\\\"89ABCDEFGHIJ\"\n"
|
||||
#" #\"0123456789abcdefghij0123456789ABCD\"\n"
|
||||
#" #\"EFGHIJ0123456789abcdefghij0123456\\\"89ABCDEFGHIJ\"\n"
|
||||
#")"))
|
||||
|
||||
(define fbo3 (make-object editor-stream-out-bytes-base%))
|
||||
|
|
Loading…
Reference in New Issue
Block a user