Re: [PATCH] strbuf_write: omit system call when length is zero

2016-02-26 Thread Stefan Beller
On Thu, Feb 25, 2016 at 5:40 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Fri, Feb 26, 2016 at 5:34 AM, Stefan Beller wrote: >>> In case the length of the buffer is zero, we do not need to call the >>> fwrite system call as a

Re: [PATCH] strbuf_write: omit system call when length is zero

2016-02-25 Thread Junio C Hamano
Duy Nguyen writes: > On Fri, Feb 26, 2016 at 5:34 AM, Stefan Beller wrote: >> In case the length of the buffer is zero, we do not need to call the >> fwrite system call as a performance improvement. > > fwrite is a libc call, not system call. Are you sure

Re: [PATCH] strbuf_write: omit system call when length is zero

2016-02-25 Thread Duy Nguyen
On Fri, Feb 26, 2016 at 5:34 AM, Stefan Beller wrote: > In case the length of the buffer is zero, we do not need to call the > fwrite system call as a performance improvement. fwrite is a libc call, not system call. Are you sure it always calls write() (assuming buffering is

Re: [PATCH] strbuf_write: omit system call when length is zero

2016-02-25 Thread Junio C Hamano
Stefan Beller writes: > In case the length of the buffer is zero, we do not need to call the > fwrite system call as a performance improvement. > > Signed-off-by: Stefan Beller > --- > > This applies on top of v17 for origin/sb/submodule-parallel-update.

[PATCH] strbuf_write: omit system call when length is zero

2016-02-25 Thread Stefan Beller
In case the length of the buffer is zero, we do not need to call the fwrite system call as a performance improvement. Signed-off-by: Stefan Beller --- This applies on top of v17 for origin/sb/submodule-parallel-update. In case there are other reasons for