Skip to content

Commit

Permalink
all buffers up to 256kB - #73
Browse files Browse the repository at this point in the history
  • Loading branch information
retrogradeorbit committed Jun 5, 2020
1 parent beb3ea3 commit b401391
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/clj/spire/scp.clj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"Send acknowledgement to the specified output stream"
[^OutputStream send ^InputStream recv ^File file
{:keys [mode buffer-size preserve progress-fn]
:or {mode 0644 buffer-size (* 32 1024) preserve false}}
:or {mode 0644 buffer-size (* 256 1024) preserve false}}
& [progress-context]]
(debug "scp-copy-file:" progress-context)
(when preserve
Expand Down Expand Up @@ -117,7 +117,7 @@
"Send acknowledgement to the specified output stream"
[^OutputStream send ^InputStream recv data size dest-name
{:keys [mode buffer-size progress-fn]
:or {mode 0644 buffer-size (* 32 1024) preserve false}}]
:or {mode 0644 buffer-size (* 256 1024) preserve false}}]
(let [size size #_(count data)]
(scp-send-command
send recv
Expand Down Expand Up @@ -345,7 +345,7 @@
(defn scp-sink-file
"Sink a file"
[^OutputStream send ^InputStream recv
^File file mode length {:keys [buffer-size progress-fn] :or {buffer-size (* 32 1024)}} & [progress-context]]
^File file mode length {:keys [buffer-size progress-fn] :or {buffer-size (* 256 1024)}} & [progress-context]]
(debugf "Sinking %d bytes to file %s" length (.getPath file))
(let [buffer (byte-array buffer-size)
final-progress-context
Expand Down
2 changes: 1 addition & 1 deletion src/clj/spire/sh.clj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
output, then this buffer size can become a bottleneck. You might also
increase the frequency with which you read the output stream if this is an
issue."}
*piped-stream-buffer-size* (* 1024 10))
*piped-stream-buffer-size* (* 1024 256))

(defn- streams-for-out
[out]
Expand Down
2 changes: 1 addition & 1 deletion src/clj/spire/ssh.clj
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ keys. All other option key pairs will be passed as SSH config options."
output, then this buffer size can become a bottleneck. You might also
increase the frequency with which you read the output stream if this is an
issue."}
*piped-stream-buffer-size* (* 1024 10))
*piped-stream-buffer-size* (* 1024 256))

(defn- streams-for-out
[out]
Expand Down

0 comments on commit b401391

Please sign in to comment.