Re: [PATCH] http-backend: buffer headers before sending

2016-08-10 Thread Junio C Hamano
Eric Wong writes: > diff --git a/http-backend.c b/http-backend.c > index 0d59499..adc8c8c 100644 > --- a/http-backend.c > +++ b/http-backend.c > @@ -75,55 +75,57 @@ static void format_write(int fd, const char *fmt, ...) > write_or_die(fd, buffer, n); > } > > -static void http_status(unsi

Re: [PATCH] http-backend: buffer headers before sending

2016-08-10 Thread Eric Wong
Jeff King wrote: > On Tue, Aug 09, 2016 at 11:47:31PM +, Eric Wong wrote: > > > 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 woul

Re: [PATCH] http-backend: buffer headers before sending

2016-08-10 Thread Jeff King
On Tue, Aug 09, 2016 at 11:47:31PM +, Eric Wong wrote: > 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

[PATCH] http-backend: buffer headers before sending

2016-08-09 Thread Eric Wong
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 H