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

Re: Git blame performance on files with a lot of history

From
Bryan Turner <bturner@atlassian.com>
Date
Dec 14, 2018, 19:10 UTC
Message-ID
<CAGyf7-EZaiVBnoBfRJXAK7KdaXzPaDFVocUrB8LQNU_Hi16u7g@mail.gmail.com>
In-Reply-To
<CABXAcUzoNJ6s3=2xZfWYQUZ_AUefwP=5UVUgMnafKHHtufzbSA@mail.gmail.com>

On Fri, Dec 14, 2018 at 10:29 AM Clement Moyroud <clement.moyroud@gmail.com> wrote:

Show 8 quoted lines
>
> Hello,
>
> My group at work is migrating a CVS repo to Git. The biggest issue we
> face so far is the performance of git blame, especially compared to
> CVS on the same file. One file especially causes us trouble: it's a
> 30k lines file with 25 years of history in 3k+ commits. The complete
> repo has 200k+ commits over that same period of time.
After you converted the repository from CVS to Git, did you run a manual repack?

The process of converting a repository from another SCM often results in poor delta chain selections which result in a repository that's unnecessarily large on disk, and/or performs quite slowly.

Something like `git repack -Adf --depth=50 --window=200` discards the existing delta chains and chooses new ones, and may result in significantly improved performance. A smaller depth, like --depth=20, might result in even more performance improvement, but may also make the repository larger on disk; you'll need to find the balance that works for you.

Might be something worth testing, if you haven't?
Bryan
Previous: Clement MoyroudNext: Clement Moyroud
Message 2 of 7 in “Git blame performance on files with a lot of history”
  1. Clement MoyroudDec 14, 2018
  2. Bryan TurnerDec 14, 2018
  3. Clement MoyroudDec 17, 2018
  4. Derrick StoleeDec 14, 2018
  5. Clement MoyroudDec 17, 2018
  6. Ævar Arnfjörð BjarmasonDec 14, 2018
  7. Clement MoyroudDec 17, 2018

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.