Commit 2d5e49fb authored by Elias Mårtenson's avatar Elias Mårtenson
Browse files

Performance optmisation for COPY-STREAM-TO-STREAM

Previously, the buffer was reallocated for every block copied. This
change ensures that the same buffer is being reused.
parent fbb9bc11
......@@ -351,7 +351,7 @@ Otherwise, using WRITE-SEQUENCE using a buffer of size BUFFER-SIZE."
(when eof (return)))
:with buffer-size = (or buffer-size 8192)
:for buffer = (make-array (list buffer-size) :element-type (or element-type 'character))
:with buffer = (make-array (list buffer-size) :element-type (or element-type 'character))
:for end = (read-sequence buffer input)
:until (zerop end)
:do (write-sequence buffer output :end end)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment