Re: fprintf_ln() is slow
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 27, 2019, 21:55 UTC
- Message-ID
- <xmqqimsqae1r.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20190627212154.GB20250@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> I'm also not entirely convinced it's worth caring about this problem at > all (whether the solution is buffering here, or just adding the "\n" > back to the original strings). It's true that p1451 shows off a > measurable improvement, but I think it's a silly, pathological case. I'd > be surprised if anybody ever noticed the difference in the real world.
Yup, exactly my thought.
> The biggest benefit I see to dealing with it is not performance, but > that it makes our messages more likely to appear atomically in the > output (if multiple entities are writing to stderr).
I was primarily in favor of getting rid of *printf_ln() functions (there are some 200+ callsites if I counted correctly) as I found it a bit distracting.