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

[PATCH 0/1] fetch: Cache the want OIDs for faster lookup

From
Masaya Suzuki <masayasuzuki@google.com>
Date
Sep 15, 2019, 21:18 UTC
Message-ID
<20190915211802.207715-1-masayasuzuki@google.com>

When mirroring a repository with a lot of refs, there is a case where the client takes a long time to calculate the want OIDs. This is observable with Chromium's repository for example.

$ mkdir testing $ cd testing $ git init . --bare $ git remote add origin master https://chromium.googlesource.com/chromium/src --mirror=fetch $ git fetch origin

With the commands above, it takes a long time before sending a fetch request. I stopped the command after 15 minutes.

Debugging this, it seems most of the time is spent on iterating the want refs to see OIDs are included there. This patch speeds up this process by using oid_set. Now the client can send a fetch request almost immediately.

Masaya Suzuki (1):
  fetch: Cache the want OIDs for faster lookup
 builtin/fetch.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
-- 
2.23.0.237.gc6a4ce50a0-goog
Next: Masaya Suzuki
Message 1 of 6 in “fetch: Cache the want OIDs for faster lookup”
  1. 0/1 fetch: Cache the want OIDs for faster lookupMasaya Suzuki, Sep 15, 2019
  2. 1/1 fetch: Cache the want OIDs for faster lookupMasaya Suzuki, Sep 15, 2019
  3. Derrick StoleeSep 16, 2019
  4. Masaya SuzukiSep 16, 2019
  5. Jeff KingSep 16, 2019
  6. Junio C HamanoSep 16, 2019

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.