Skip searching for better indentation heuristics if we'd slide a hunk more
than its size. This is the easiest fix proposed in the analysis[1] in
response to a patch that mercurial took for xdiff to limit searching
by a constant. Using a performance test as:
#!python
open('a', 'w').write(
Michael Haggerty writes:
> So if `N ≫ M`, there is necessarily a lot of repetition among the `N +
> M` lines that the hunk could possibly overlay. Specifically, it must
> consist of `floor((N + M)/M)` identical copies of the hunk, plus
> possibly a few leftover lines constituting the start of ano
On Mon, Jul 2, 2018 at 7:27 PM Stefan Beller wrote:
> On Sun, Jul 1, 2018 at 8:57 AM Michael Haggerty wrote:
> [...]
> So this suggests to have MAX_BORING to be
> "hunk size + some small constant offset" ?
That would be my suggestion, yes. There are cases where it will be
more expensive than a f
On Sun, Jul 1, 2018 at 8:57 AM Michael Haggerty wrote:
>
> On 06/29/2018 10:28 PM, Stefan Beller wrote:
> > [...]
> > Adds some threshold to avoid expensive cases, like:
> >
> > ```
> > #!python
> > open('a', 'w').write(" \n" * 100)
> > open('b', 'w').write(" \n" * 101)
On 06/29/2018 10:28 PM, Stefan Beller wrote:
> [...]
> Adds some threshold to avoid expensive cases, like:
>
> ```
> #!python
> open('a', 'w').write(" \n" * 100)
> open('b', 'w').write(" \n" * 101)
> ```
>
> The indent heuristic is O(N * 20) (N = 100) for t
Excerpts from Stefan Beller's message of 2018-06-29 16:37:41 -0700:
> [...]
> Jun, Junio
>
> By changing the authorship we'd want to have a sign off from the original
> author,
> before applying; in the previous attempt, I was merely taking the code from
> mercurial as their copy of xdiff is also
From: Jun Wu
This patch was written originally for mercurial at [1],
adding a limit on how long we'd be looking for an
optimal indent heuristic. Choose the limit high enough
to only limit edge cases.
Adds some threshold to avoid expensive cases, like:
```
#!python
open('a', 'w')
Stefan Beller writes:
> This patch was written originally for mercurial at
> https://phab.mercurial-scm.org/rHGc420792217c89622482005c99e959b9071c109c5
>
> changeset: 36674:c420792217c8
> user:Jun Wu
> date:Sat Mar 03 12:39:11 2018 -0800
> files: mercurial
This patch was written originally for mercurial at
https://phab.mercurial-scm.org/rHGc420792217c89622482005c99e959b9071c109c5
changeset: 36674:c420792217c8
user:Jun Wu
date:Sat Mar 03 12:39:11 2018 -0800
files: mercurial/thirdparty/xdiff/xdiffi.c
descri
9 matches
Mail list logo