Re: [PATCH 8/7] cat-file: sort and de-dup output of --batch-all-objects
- From
Charles Bailey <charles@hashpling.org>
- Date
- Jun 22, 2015, 22:03 UTC
- Message-ID
- <20150622220350.GB18677@hashpling.org>
- In-Reply-To
- <20150622110632.GA26436@peff.net>
On Mon, Jun 22, 2015 at 07:06:32AM -0400, Jeff King wrote:
Show 13 quoted lines
> On Mon, Jun 22, 2015 at 06:33:21AM -0400, Jeff King wrote: > > > By the way, in addition to not showing objects in order, > > list-all-objects (and my cat-file option) may show duplicates. Do we > > want to "sort -u" for the user? It might be nice for them to always get > > a de-duped and sorted list. Aside from the CPU cost of sorting, it does > > mean we'll allocate ~80MB for the kernel to store the sha1s. I guess > > that's not too much when you are talking about the kernel repo. I took > > the coward's way out and just mentioned the limitation in the > > documentation, but I'm happy to be persuaded. > > The patch below does the sort/de-dup. I'd probably just squash it into > patch 7, though.
Woah, 8 out of 7! Did you get a chance to measure the performance hit of the sort? If not, I may test it out when I next get the chance.