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

Re: Efficiently detecting paths that differ from each other only in case

From
Jeff King <peff@peff.net>
Date
Oct 17, 2010, 04:25 UTC
Message-ID
<20101017042525.GA15595@sigill.intra.peff.net>
In-Reply-To
<AANLkTimSNTKFYnYgpha4MpyiC5CdZU5ay1B-848JQrzJ@mail.gmail.com>
On Sat, Oct 16, 2010 at 05:37:53PM -0500, Dun Peal wrote:
Show 9 quoted lines
> Running:
> 
>     git ls-tree -r HEAD
> 
> produces almost 100k lines of output, representing 100k total file +
> directory count, which is a pretty big tree. I hope and expect to be
> able to split out some branches in the future, but even with
> everything included, the operation still only takes ~0.5s real (user +
> sys).

Out of curiosity, is your bare repo fully packed? My linux-2.6 repo is only ~35000 entries, but it can ls-tree -r with a warm cache in about .09s. If it scaled linearly with the number of files, that would be almost twice as fast as yours.

The distribution of files within your directories can impact exactly how many trees you have, and thus the lookup performance. Or maybe your machine is simply a little bit slower. But since you seem performance-conscious, it might be worth double-checking.

-Peff
Previous: Dun PealNext: Jonathan Nieder
Message 13 of 14 in “Efficiently detecting paths that differ from each other only in case”
  1. Dun PealOct 8, 2010
  2. Jeff KingOct 8, 2010
  3. Dun PealOct 8, 2010
  4. Jeff KingOct 8, 2010
  5. Dun PealOct 8, 2010
  6. Jeff KingOct 8, 2010
  7. Dun PealOct 8, 2010
  8. Jakub NarebskiOct 9, 2010
  9. Dun PealOct 9, 2010
  10. Jakub NarebskiOct 9, 2010
  11. Jeff KingOct 11, 2010
  12. Dun PealOct 16, 2010
  13. Jeff KingOct 17, 2010
  14. Jonathan NiederOct 8, 2010

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.