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

Re: Debugging git-commit slowness on a large repo

From
Tomas Carnecky <tom@dbservice.com>
Date
Dec 4, 2011, 13:54 UTC
Message-ID
<4EDB7B82.8090707@dbservice.com>
In-Reply-To
<CAFE9C7B.2BFEC%joshua.redstone@fb.com>
On 12/3/11 12:17 AM, Joshua Redstone wrote:
Show 12 quoted lines
> Hi,
> I have a git repo with about 300k commits,  150k files totaling maybe 7GB.
>   Locally committing a small change - say touching fewer than 300 bytes
> across 4 files - consistently takes over one second, which seems kinda
> slow.  This is using git 1.7.7.4 on a linux 2.6 box.  The time does not
> improve after doing a git-gc (my .git dir has maybe 250 files after a git
> gc).  The same size commit on a brand new repo takes<  10ms.  Any thoughts
> on why committing a small change seems to take a long time on larger repos?
>
> Fwiw, I also tried doing the same test using libgit2 (via the pygit2
> wrapper), and it was ever slower (about 6 seconds to commit the same small
> change).
try git commit --no-status
Previous: Joshua Redstone
Message 16 of 16 in “Debugging git-commit slowness on a large repo”
  1. Joshua RedstoneDec 2, 2011
  2. Carlos Martín NietoDec 3, 2011
  3. Junio C HamanoDec 5, 2011
  4. Joshua RedstoneDec 7, 2011
  5. Nguyen Thai Ngoc DuyDec 7, 2011
  6. Joshua RedstoneDec 7, 2011
  7. Nguyen Thai Ngoc DuyDec 8, 2011
  8. Joshua RedstoneDec 9, 2011
  9. Joshua RedstoneDec 9, 2011
  10. Joshua RedstoneDec 13, 2011
  11. Joshua RedstoneDec 20, 2011
  12. Junio C HamanoDec 20, 2011
  13. Joshua RedstoneDec 20, 2011
  14. Thomas RastDec 20, 2011
  15. Joshua RedstoneDec 20, 2011
  16. Tomas CarneckyDec 4, 2011

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.