Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] refs: write packed_refs file using stdio

From: Jeff King <hidden>
Date: 2016-06-15 23:02:29

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 so we can write()
it. That seems like a solid case for using fprintf instead.

We can't just writev() a bunch of buffers we have already. We'd
literally have to make an array of buffers to format into. It's much
simpler (and probably faster) to just format directly into stdio's
buffers.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help