Re: [PATCH v2 00/19] Multiparent diff tree-walker + combine-diff speedup
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 24, 2014, 23:43 UTC
- Message-ID
- <CACsJy8BXMVNVAyqPEbHTkGxSSEJ6DpYUVwZqthiMQfO7Tj9T8A@mail.gmail.com>
- In-Reply-To
- <cover.1393257006.git.kirr@mns.spb.ru>
On Mon, Feb 24, 2014 at 11:21 PM, Kirill Smelkov <kirr@mns.spb.ru> wrote:
Show 8 quoted lines
> Hello up there. > > Here go combine-diff speedup patches in form of first reworking diff > tree-walker to work in general case - when a commit have several parents, not > only one - we are traversing all 1+nparent trees in parallel. > > Then we are taking advantage of the new diff tree-walker for speeding up > combine-diff, which for linux.git results in ~14 times speedup.
I think there is another use case for this n-tree walker (but I'm not entirely sure yet as I haven't really read the series). In git-log (either with pathspec or --patch) we basically do this
diff HEAD^ HEAD diff HEAD^^ HEAD^ diff HEAD^^^ HEAD^^ diff HEAD^^^^ HEAD^^^ ...
so except HEAD (and the last commit), all commits' tree will be read/diff'd twice. With n-tree walker I think we may be able to diff them in batch to reduce extra processing: commit lists are split into 16-commit blocks where 16 trees are fed to the new tree walker at the same time. I hope it would make git-log a bit faster (especially for -S). Maybe not much.
-- Duy