Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Dec 2019 10:55:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 242828] diff -rq still does full file comparison
Message-ID:  <bug-242828-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242828

            Bug ID: 242828
           Summary: diff -rq still does full file comparison
           Product: Base System
           Version: 12.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: ml@netfence.it

In a task of mine I often have to "diff -rq" two directories which have ~75=
000
files; those files are usually very similar, with a only a few lines differ=
ing.
Some of them have up to 25M lines.

On 11.3 (which feature GNU diff), the whole process usually take a few minu=
tes.

On 12.1 (which feature BSD diff), I was never able to complete it: most of =
the
times I just interrupted it after some hours, but in a case it did crash the
whole system due to an out of swap situation (16GB RAM + 32GB swap!!!).


I tried to find out the reason with gdb and I am convinced that:
_ 11.3, as soon as it sees a file differs, will move to the next one;
_ OTOH, 12.1 will still compute the whole diff set for that file, although =
it
just have to print "File x and y differ".




Of course, there's a workaround as simple as installing textproc/diffutils =
and
using "gdiff" instead of "diff".

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-242828-227>