Comment 6 for bug 202928

Revision history for this message
Stefan Monnier (monnier) wrote : Re: [Bug 202928] Re: bzr diff slow against ancestor

> Thanks for filing this bug. I've got a couple of things you might want
> to try -- I've no idea whether they'll be faster, but the numbers will
> be interesting.

> In trunk, do 'bzr merge --preview ../some-branch'. That's like 'diff -r
> ancestor' except a little more thorough.

Actually, it's quite different:

         +-------------+- BRANCH
        / /
       / /
   ---+-------------+--+- ANCESTOR
                    |
                  BASE

your command gives me a diff between BASE and ANCESTOR, whereas the one
I want is between BASE and BRANCH.

> The other thing is to do the operation on the whole tree, rather than a
> single file. My hunch is that it'll take about the same time as for the
> one file.

Actually the diff between BASE and BRANCH is almost 2MB, so it does take
a little bit longer, but of course not much (it's pretty clear that the
time is not spent diffing) and more importantly for me it doesn't really
give me the info I want (well, it does, but then I have to look for
those few relevant lines among the ton of irrelevant output).

   % time bzr diff -r ancestor:../trunk src/coding.c | wc
        40 133 1086
   bzr diff -r ancestor:../trunk src/coding.c 139.30s user 0.34s system 99% cpu 2:20.31 total
   wc 0.00s user 0.00s system 0% cpu 2:20.31 total
   % time bzr diff -r ancestor:../trunk | wc
     47569 216917 1703489
   bzr diff -r ancestor:../trunk 156.43s user 0.58s system 99% cpu 2:37.88 total
   wc 0.15s user 0.00s system 0% cpu 2:37.88 total
   %

-- Stefan