From 310819ea86ac7f85d39a2a8720c4d179c8c94277 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 5 Mar 2016 00:24:16 +0000 Subject: git-http-backend: favor sysread for regular files We do not need line buffering, here; so favor sysread to bypass extra copies which may be done by normal read. --- lib/PublicInbox/GitHTTPBackend.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index c84eefcf..50bb4331 100644 --- a/lib/PublicInbox/GitHTTPBackend.pm +++ b/lib/PublicInbox/GitHTTPBackend.pm @@ -73,7 +73,7 @@ sub serve { my $n = 8192; while ($len > 0) { $n = $len if $len < $n; - my $r = read($in, $buf, $n); + my $r = sysread($in, $buf, $n); last if (!defined($r) || $r <= 0); $len -= $r; $fh->write($buf); -- cgit v1.2.3-24-ge0c7