[patch] fix bug 65714 bzr 0.11 takes an inordinate amount of time to process a commit

Martin Pool mbp at canonical.com
Mon Oct 30 10:58:18 GMT 2006


On 29 Oct 2006, Cheuksan Edward Wang <wang02139 at gmail.com> wrote:
> 
> Replace python's difflib by patiencediff because the worst case
> performance is cubic for difflib (get_matching_blocks) and people committing
> large data
> files are often hurt by this. The worst case performance of patience is
> quadratic. Fix bug 65714.
> 
> If there is an easy way to run benchmarks, can someone tell me how to run them?
> I want to see the change in commit time and size of the knits.

As Aaron said, you can do 'bzr selftest --benchmark'.  This doesn't
report on the *size* of the knits at the moment (perhaps it should),
but only on the runtime.  If you could please run that with and without
then we can merge this.

> -                delta_seq = KnitSequenceMatcher(None, old_texts, new_texts)
> +                delta_seq = bzrlib.patiencediff.PatienceSequenceMatcher(
> +                                                 None, old_texts, new_texts)
>              return self._make_line_delta(delta_seq, content)

This constructor passes an is_junk function parameter, which (I think)
we never use, and which is rather less useful for patiencediff.  It may
(or may not) give a small improvement to remove support for that.

-- 
Martin




More information about the bazaar mailing list