Re: [PATCH 7/9] strbuf_getwholeline: use getdelim if it is available
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 22, 2015, 18:00 UTC
- Message-ID
- <alpine.DEB.1.00.1504222000040.28561@s15462909.onlinehome-server.info>
- In-Reply-To
- <CAPig+cSKtMPQGxp1Y2GinVRh2y--QyJh_nxhDez2CGFPP6B=xg@mail.gmail.com>
Hi,
On 2015-04-17 12:16, Eric Sunshine wrote:
Show 5 quoted lines
> On Thu, Apr 16, 2015 at 5:01 AM, Jeff King <peff@peff.net> wrote: >> We spend a lot of time in strbuf_getwholeline in a tight >> loop reading characters from a stdio handle into a buffer. >> The libc getdelim() function can do this for us with less >> overhead.
Just for the record: Git for Windows cannot lean on `getdelim()`, as it is not available on Windows. Do not let that stop you; if it turns out to impact performance, we will just have to come up with our own implementation of that function.
Ciao, Dscho