On Tue, Jun 8, 2021 at 3:24 PM Stefan Sperling <s...@stsp.name> wrote:
>
> On Tue, Jun 08, 2021 at 02:57:34PM +0200, Johan Corveleyn wrote:
> > Okay, I focused on the first revision causing the annotate to differ,
> > and with some debug logging:
> > - p went up to 139
> > - length[0]=1942, length[1]=1817
> >
> > Now, 1942 lines on the left and 1817 on the right doesn't seem all
> > that many (that's what remains after prefix-suffix stripping). I see
> > no reason 'svn diff' shouldn't be able to calculate a minimal diff for
> > those sizes in a reasonable amount of time. So if p can go up to such
> > a "cost" for such "reasonable" lenghts, I imagine we should put the
> > actual limit much higher. I suppose we can just as well set "min_cost"
> > to 1024 or even higher. 64 is way too low.
>
> Thanks!
> I have set the value back to at least 1024 with this new version of patch.

Hmmm, apparently I'm still running into the limit. Even with 8192 I'm
hitting it at least once. The actual diff there is not really pretty,
but it's an actual manual change made by some developer years ago, and
the "minimal diff" is more or less readable / understandable. The log
message is something like "Group sections related to multimedia
module", and it shuffles around a lot of xml sections to group them
together.

In this case, length[0]==length[1]==46780. Pretty big for the LCS, but
not humongous. The value of 'p' goes up to 8279.

With the limit set to 16384, I'm not hitting it, and the annotate
comes out as with the original.

Now, I'm a bit puzzled why limit==8192 already takes 18s in your
tests. In my situation, with the above diff, I get:
limit==8192: 3.3s
limit==16384: 3.5s

(that's including downloading both versions from the server over https)

So I'm wondering why it takes so long in your case. One thing to keep
in mind here is that, since this is cpu intensive, optimizations might
matter. I remember back in 2011 that I did most of my measurements
with a "Release" build for example. But the above tests I did were
with a debug build, so ... dunno.

Also: one of the last things that Morten Kloster committed in 2011 was
another performance improvement, namely "restarting the LCS" in some
specific cases. At the time, I didn't have enough time to review this
properly, and had some reservations (but mainly lack of time), so I
asked him to commit it on a branch (diff-improvements). This feature
branch never made it to trunk. Just as another "shot", perhaps you
could try r1140247 and see if it helps?

-- 
Johan

Reply via email to