[Bug 4285] New: binary diff extremely slow on certain (admittedly difficult) inputs

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Thu Jun 19 16:53:22 CDT 2014


http://bz.selenic.com/show_bug.cgi?id=4285

          Priority: normal
            Bug ID: 4285
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: binary diff extremely slow on certain (admittedly
                    difficult) inputs
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: dovdevel at gmail.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 2.8.2
         Component: Mercurial
           Product: Mercurial

While trying to clone git+https://github.com/aquynh/capstone.git (using
hg-git), the git repo gets downloaded fine, and then mercurial starts
"importing git objects into hg", but after importing 74 csets that seems to get
stuck -- cpu usage is 100% but there is no visible progress. A little bit of
debugging showed that in fact all the time is spent inside bdiff.so . After
about 10 minutes it finishes and continues, but then gets stuck again around
cset 558, and I ended up killing it after more than an hour of no visible
progress. Also, while "stuck", mercurial doesn't respond to ctrl-c, and must be
killed -9.

Besides testing on the original repo above, I've also created a repo containing
just two versions of the problematic file:
https://bitbucket.org/dov/hg-bdiff-issue . Cloning this repo is fine, but if
you then create a new repo and commit the file from r0, then replace it with
the version from r1 and try committing that, the latter commit takes about 7:30
minutes.

I realize that the file is quite problematic -- about 20--40MB(!) of patterns
which repeat over and over -- but for comparison, git commits the second
version in about 4 seconds...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list