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

Re: [PATCH v2] add: add --bulk to index all objects into a pack file

From
Duy Nguyen <pclouds@gmail.com>
Date
Oct 4, 2013, 12:38 UTC
Message-ID
<CACsJy8BLyOtWck1ZidnBZo+KuBiSa5a4mZtbG6LQxTnv3sQXQw@mail.gmail.com>
In-Reply-To
<1380869871-31631-1-git-send-email-pclouds@gmail.com>
On Fri, Oct 4, 2013 at 1:57 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 6 quoted lines
> It's not an all-win situation though. --bulk is slower than --no-bulk
> because:
>
>  - Triple hashing: we need to calculate both object SHA-1s _and_ pack
>    SHA-1. At the end we have to fix up the pack, which means rehashing
>    the entire pack again. --no-bulk only cares about object SHA-1s.

Oops, it's quadruple hashing: one for object sha-1 (1), one for pack sha-1 while writing pack (2), two for pack header fixup: one after the the header fixup (3), and one repeating the same (2) just to verify that it matches (2) exactly (4). Do we have to be this paranoid? I think we could drop (2) and (4) in this case.

-- 
Duy
Previous: Duy Nguyen
Message 7 of 7 in “add: add --bulk to index all objects into a pack file”
  1. add: add --bulk to index all objects into a pack fileNguyễn Thái Ngọc Duy, Oct 3, 2013
  2. Junio C HamanoOct 3, 2013
  3. Duy NguyenOct 3, 2013
  4. add: add --bulk to index all objects into a pack fileNguyễn Thái Ngọc Duy, Oct 4, 2013
  5. Matthieu MoyOct 4, 2013
  6. Duy NguyenOct 4, 2013
  7. Duy NguyenOct 4, 2013

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.