aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-05-09 19:04:31 +0100
committerChristopher Baines <mail@cbaines.net>2020-05-09 19:04:31 +0100
commit7c2be71f5537f1ed30007ebee76d31902a16015a (patch)
treecd0fff75a611579f1b16a453d0e217943881e287
parent991ba7e4feaea40910b3dc4481944d8ee865c497 (diff)
downloadbuild-coordinator-7c2be71f5537f1ed30007ebee76d31902a16015a.tar
build-coordinator-7c2be71f5537f1ed30007ebee76d31902a16015a.tar.gz
Tune submitting outputs for performance
These settings slightly speed up sending outputs back to the coordinator.
-rw-r--r--guix-build-coordinator/utils.scm10
1 files changed, 7 insertions, 3 deletions
diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm
index 61db3b4..1dd4cbf 100644
--- a/guix-build-coordinator/utils.scm
+++ b/guix-build-coordinator/utils.scm
@@ -155,7 +155,7 @@ If already in the worker thread, call PROC immediately."
(define line-length 72) ; must be a multiple of 4
(define buffer-length
(let ((bytes-per-line (* 3 (/ 72 4)))
- (lines-per-buffer 128))
+ (lines-per-buffer 65536))
(* bytes-per-line lines-per-buffer)))
(define buffer (make-bytevector buffer-length))
@@ -270,10 +270,14 @@ upcoming chunk."
(let ((request (write-request request port)))
(let* ((chunked-output-port
(make-chunked-output-port
- (request-port request)
+ port
;; The number of bytes produced when the base64 port flushes
;; it's buffer
- #:buffering 9343
+ #:buffering (let ((lines 65536)
+ (line-length 72))
+ (- (* (+ line-length 1)
+ lines)
+ 1))
#:keep-alive? #t))
(base64-output-port
(make-base64-output-port chunked-output-port)))