On Wed, Sep 10, 2014 at 07:32:17AM -0700, Ronnie Sahlberg wrote:
> Even better could be to build an iovec for all the data and use writev() ?
> (now without gmail adding formatting)
I'm not sure that would make anything easier. We're literally
sprintf-ing (and calling sha1_to_hex) into a buffer s
On Wed, Sep 10, 2014 at 01:21:27PM +0200, Michael Haggerty wrote:
> > + if (fclose(out))
> > + die_errno("write error");
> > + packed_ref_cache->lock->fd = -1;
>
> It might be a minuscule bit safer to set `lock->fd = -1` *before*
> calling `fclose()`.
Yeah, I considered that. The w
On 09/10/2014 12:03 PM, Jeff King wrote:
> We write each line of a new packed-refs file individually
> using a write() syscall (and sometimes 2, if the ref is
> peeled). Since each line is only about 50-100 bytes long,
> this creates a lot of system call overhead.
>
> We can instead open a stdio h
We write each line of a new packed-refs file individually
using a write() syscall (and sometimes 2, if the ref is
peeled). Since each line is only about 50-100 bytes long,
this creates a lot of system call overhead.
We can instead open a stdio handle around our descriptor and
use fprintf to write
4 matches
Mail list logo