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

git add -p is slow for sparse checkout

From
MKManoraj K <mkenchugonde@atlassian.com>
Date
Dec 6, 2024, 03:46 UTC
Message-ID
<CACfnds=++C75pg8ojn5sJzjKzLcgnyPxgR2c6pOPCRmf2rDKvQ@mail.gmail.com>
Hi team,

I am currently on a sparse checkout repository, and it looks like the `git add—p` command is much slower than in a full checkout repository.

When run, the `git add—p` command expands to the full index and takes more time to start showing the patch.

Also, we have git trace2 enabled, and the timings of the subcommands gave us an indication that the `git apply—-cached` subcommand is taking way too long, with an average P50 of 3000ms against 300ms in the full checkout repository. The other notable spikes are in `git diff-files --color` (180ms vs 80ms) and `git diff-files --no-color` (180ms vs 80ms).

I am really interested in understanding why `git add -p` expands to a full index, which I believe is the issue with start-up regression. Also, would be great to understand the difference in performance of the subcommands.

Next: Manoraj K
Message 1 of 4 in “git add -p is slow for sparse checkout”
  1. Manoraj KDec 6, 2024
  2. Manoraj KDec 6, 2024
  3. Shubham KanodiaDec 6, 2024
  4. Shubham KanodiaDec 9, 2024

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.