Re: all memory consuming `git diff-tree` bug
- From
Antoine Pelisse <apelisse@gmail.com>
- Date
- Apr 28, 2020, 04:18 UTC
- Message-ID
- <CALWbr2zjL5pKrvk1pRXUKgOLE+kVKzLjR3ofUOhRruAbiVVovg@mail.gmail.com>
- In-Reply-To
- <20200428041010.GA2371637@coredump.intra.peff.net>
On Mon, Apr 27, 2020 at 9:10 PM Jeff King <peff@peff.net> wrote:
Show 5 quoted lines
> Without engaging my brain to think about what this code is doing or > whether there might be clever solutions, it really sounds like we might > consider using this quadratic code for small cases if it produces better > results, and then switching to the less-accurate greedy implementation > when we need to.
I remember having the exact same thought at the time I wrote this, but my limited tests with 10k lines files were fine so I discarded it.
Falling-back on the greedy algorithm seems reasonable in that case.
Antoine