[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/06: publish: Use 'sendfile' when possible.
From: |
Ludovic Courtès |
Subject: |
03/06: publish: Use 'sendfile' when possible. |
Date: |
Tue, 18 Apr 2017 17:20:07 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 339a79fd6aec74f0b7520440e01b8bf79eca73e7
Author: Ludovic Courtès <address@hidden>
Date: Tue Apr 18 00:28:39 2017 +0200
publish: Use 'sendfile' when possible.
* guix/scripts/publish.scm (http-write): In the
'application/octet-stream' case, use 'sendfile' when OUTPUT is a file
port.
---
guix/scripts/publish.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index 111cb29..f54757b 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -469,7 +469,9 @@ blocking."
size)
client))
(output (response-port response)))
- (dump-port input output)
+ (if (file-port? output)
+ (sendfile output input size)
+ (dump-port input output))
(close-port output)
(values)))))
(lambda args
- branch master updated (54412eb -> d72b420), Ludovic Courtès, 2017/04/18
- 02/06: publish: Introduce 'actual-compression'., Ludovic Courtès, 2017/04/18
- 03/06: publish: Use 'sendfile' when possible.,
Ludovic Courtès <=
- 06/06: publish: Remove expired cache entries when '--ttl' is used., Ludovic Courtès, 2017/04/18
- 01/06: Add (guix workers)., Ludovic Courtès, 2017/04/18
- 05/06: Add (guix cache) and use it in (guix scripts substitute)., Ludovic Courtès, 2017/04/18
- 04/06: publish: Add '--cache' and '--workers'., Ludovic Courtès, 2017/04/18