[PATCH 5 of 6 STABLE] bdiff: balance recursion to avoid quadratic behavior (issue4704)

Yuya Nishihara yuya at tcha.org
Mon Apr 25 11:45:25 EDT 2016


On Sat, 23 Apr 2016 10:41:18 -0500, Matt Mackall wrote:
> # HG changeset patch
> # User Matt Mackall <mpm at selenic.com>
> # Date 1461294251 18000
> #      Thu Apr 21 22:04:11 2016 -0500
> # Branch stable
> # Node ID 5a887b289abf6d5e7947fa3fac98a658cbdcebe1
> # Parent  7d0c61d568ac831fd59f6aaf480418acedae1eda
> bdiff: balance recursion to avoid quadratic behavior (issue4704)

> Included is a smaller test that has a roughly 50x safety margin on the
> performance it accepts. It's likely to fail on pure builds because
> difflib also has a recursion-balancing problem.

> +++ b/tests/test-issue4074.t	Thu Apr 21 22:04:11 2016 -0500
> @@ -0,0 +1,27 @@
> +A script to generate nasty diff worst-case scenarios:

Should we guard the test by '#require no-pure' ?


More information about the Mercurial-devel mailing list