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

Noticed big performance issue when fetching multiple refs with depth 1 enabled

From
RVRicard Valverde <ricard.valverde@socialpoint.es>
Date
Mar 18, 2022, 14:44 UTC
Message-ID
<CABkk9JoOYJ-tH9MrMkfdj5xMV+exXaJ2FxSjiSCMwCxsjaKqGg@mail.gmail.com>

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue) Do a git fetch --depth=1 , with no remote changes, having a lot of remote branches makes the issue more visible What did you expect to happen? (Expected behavior) Shallow fetch should be faster or as fast as a full fetch What happened instead? (Actual behavior) Shallow fetch is about 10x slower than full fetch, consistently What's different between what you expected and what actually happened? I expected the shallow fetch to be faster than a normal fetch, or as fast. Did not expect it being 10x slower. Anything else you want to add: Tested in a repository with ~10000 remote branches, a single Github hosted remote. Also tested with a local remote, and Git 2.35.1 version, with comparable results. Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.32.0 (Apple Git-132) cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Darwin 20.6.0 Darwin Kernel Version 20.6.0: Tue Feb 22 21:10:41 PST 2022; root:xnu-7195.141.26~1/RELEASE_X86_64 x86_64 compiler info: clang: 13.0.0 (clang-1300.0.29.30) libc info: no libc information available $SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks]
Next: brian m. carlson
Message 1 of 2 in “Noticed big performance issue when fetching multiple refs with depth 1 enabled”
  1. Ricard ValverdeMar 18, 2022
  2. brian m. carlsonMar 18, 2022

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.