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