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

Re: Long clone time after "done."

From
Jeff King <peff@peff.net>
Date
Nov 8, 2012, 22:11 UTC
Message-ID
<20121108221128.GA11186@sigill.intra.peff.net>
In-Reply-To
<CAMJd5ARLCk_WQTbyLciv0LnrMa_J0YstNsrq-hLYM5DXiO0hLA@mail.gmail.com>
On Thu, Nov 08, 2012 at 03:49:32PM -0600, Uri Moszkowicz wrote:
> I'm using RHEL4. Looks like perf is only available with RHEL6.

Yeah, RHEL4 is pretty ancient; I think it predates the invention of "perf".

Show 7 quoted lines
> heads: 308
> tags: 9614
> 
> Looking up the tags that way took a very long time by the way. "git
> tag | wc -l" was much quicker. I've already pruned a lot of tags to
> get to this number as well. The original repository had ~37k tags
> since we used to tag every commit with CVS.

Hmm. I think for-each-ref will actually open the tag objects, but "git tag" will not. That would imply that reading the refs is fast, but opening objects is slow. I wonder why.

How many packs do you have in .git/objects/pack of the repository?
> All my tags are packed so cat-file doesn't work:
> fatal: git cat-file refs/tags/some-tag: bad file

The packing shouldn't matter. The point of the command is to look up the refs/tags/some-tag ref (in packed-refs or in the filesystem), and then open and write the pointed-to object to stdout. If that is not working, then there is something seriously wrong going on.

-Peff
Previous: Uri MoszkowiczNext: Uri Moszkowicz
Message 9 of 13 in “Long clone time after "done."”
  1. Uri MoszkowiczOct 23, 2012
  2. Nguyen Thai Ngoc DuyOct 24, 2012
  3. Uri MoszkowiczOct 24, 2012
  4. Uri MoszkowiczNov 7, 2012
  5. Jeff KingNov 8, 2012
  6. Uri MoszkowiczNov 8, 2012
  7. Jeff KingNov 8, 2012
  8. Uri MoszkowiczNov 8, 2012
  9. Jeff KingNov 8, 2012
  10. Uri MoszkowiczNov 8, 2012
  11. Jeff KingNov 8, 2012
  12. Uri MoszkowiczNov 8, 2012
  13. Uri MoszkowiczNov 26, 2012

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.