diff options
author | Eric Wong <e@80x24.org> | 2016-08-09 23:47:31 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-10 09:27:26 -0700 |
commit | b36045c1dc43e36f6fb84b041b59317b7f02b58c (patch) | |
tree | fa2d7692447f207f7431c3f2740078afda7460c8 /revision.c | |
parent | 00f27feb6afaa9e5f91a0852a5a20c041ba0a421 (diff) | |
download | git-b36045c1dc43e36f6fb84b041b59317b7f02b58c.tar.gz git-b36045c1dc43e36f6fb84b041b59317b7f02b58c.tar.xz |
http-backend: buffer headers before sending
Avoid waking up the readers for unnecessary context switches for
each line of header data being written, as all the headers are
written in short succession.
It is unlikely any HTTP/1.x server would want to read a CGI
response one-line-at-a-time and trickle each to the client.
Instead, I'd expect HTTP servers want to minimize syscall and
TCP/IP framing overhead by trying to send all of its response
headers in a single syscall or even combining the headers and
first chunk of the body with MSG_MORE or writev.
Verified by strace-ing response parsing on the CGI side.
Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
0 files changed, 0 insertions, 0 deletions