git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] builtin-bundle.c - use stream buffered input for rev-list

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 10, 2007, 22:58 UTC
Message-ID
<7vvebnq9nv.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<11867849893486-git-send-email-mdl123@verizon.net>
Mark Levedahl <mdl123@verizon.net> writes:
> git-bundle create on cygwin was nearly unusable due to 1 character
> at a time (unbuffered) reading from an exec'ed process.

Gaah, well spotted. I was wondering what that 20x difference was, but did not notice that read_string() thing.

That function is probably sometimes necessary if you are reading from a non-seekable fd and need to stop immediately after reading the header (so that you can hand the rest to pack handling code), but it really should be the last-ditch thing to read one-byte-at-a-time.

Also, I even suspect that we are always reading from a seekable bundle file in this program and it should be able to use buffered input with seeking back as needed after you read enough.

Previous: Mark LevedahlNext: Mark Levedahl
Message 2 of 5 in “builtin-bundle.c - use stream buffered input for rev-list”
  1. builtin-bundle.c - use stream buffered input for rev-listMark Levedahl, Aug 10, 2007
  2. Junio C HamanoAug 10, 2007
  3. builtin-bundle - use buffered reads for bundle headerMark Levedahl, Aug 11, 2007
  4. Junio C HamanoAug 11, 2007
  5. builtin-bundle - use buffered reads for bundle headerMark Levedahl, Aug 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.