Bill McCarthy wrote:
Hello Vim Developers,

To better understand what vimdiff is doing (and why it is so
slow), I had my shell (4NT under WinXP) keep a log showing
me just what was requested. [Note: I use '>!' instead of '>'
for redirection because my 4NT is set to not overwrite
existing files unless explicitly told to do so.]

Invoking vimdiff with:  gvim -d file1 file2

I can see that the following 3 shell requests are made:

    diff -a VIo2A3F.tmp VIn2A40.tmp >!VId2A41.tmp
    diff -a --binary VIo2A3F.tmp VIn2A40.tmp >!VId2A41.tmp
    diff -a --binary VIo2A3F.tmp VIn2A40.tmp >!VId2A41.tmp

The log shows about 4 seconds between commands.

I would have thought that the first diff would provide
enough information.  What is the purpose of the other two?


Just guessing.

As noted in the help (e.g. under ":help 'diffexpr'), vimdiff uses ed-style diffs, which (unlike context or unified diffs) are not reversible. It may need those three calls to properly highlight both windows of the vimdiff. The fact that the temporary files' _names_ are the same between calls doesn't prove that their _contents_ are the same.

Or you may have a nonstandard diff.exe: the --help for my GNU diff (version 2.8.7) makes no mention of a --binary argument.


Best regards,
Tony.

Reply via email to