publish: Improve performance by increasing buffer size.
authorRicardo Wurmus <rekado@elephly.net>
Tue, 19 May 2020 21:14:30 +0000 (23:14 +0200)
committerRicardo Wurmus <rekado@elephly.net>
Tue, 19 May 2020 21:15:41 +0000 (23:15 +0200)
* guix/scripts/publish.scm (http-write): Increase socket send buffer.

guix/scripts/publish.scm

index f5b2f5f..a00f08f 100644 (file)
@@ -851,6 +851,7 @@ blocking."
                                                                          size)
                                                     client))
                           (output   (response-port response)))
+                     (setsockopt client SOL_SOCKET SO_SNDBUF (* 128 1024))
                      (if (file-port? output)
                          (sendfile output input size)
                          (dump-port input output))