git difftool is extremely slow

Created on 10 Feb 2017  路  4Comments  路  Source: git-for-windows/git

  • [x] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
git version 2.11.0.windows.1
sizeof-long: 4
machine: x86_64
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
8.1 64bit
Microsoft Windows [Version 6.3.9600]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
Path Option: Cmd
SSH Option: OpenSSH
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled
Enable Builtin Difftool: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

* insert your response here *

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Bash, CMD OR PowerShell

git init
git config diff.tool deltawalker
git config difftool.prompt false
echo "testfile" > foo.txt
git add .
git commit -m "first commit"
echo "minimal change" > foo.txt
Measure-Command {git diff}
Measure-Command {git difftool}
  • What did you expect to occur after running these commands?

I'd expect BOTH operations to be lightning fast, because there isn't much to do here. Instead calling difftool lets me wait forever. I set diff.tool to the non-existing deltawalker to rule out any third party influence during execution time measurements.

diff

  • What actually happened instead?

difftool

The results in the git bash or cmd.exe are just the same:
diff_bash
difftool_bash

Most helpful comment

Difftool is a perl script that creates tons of processes. Maybe it becomes slow because of antivirus activity or something.
Try experimental built-in difftool (available in the installer).

All 4 comments

Now this is strange. On my Windows 7 machine at home difftool takes 0,97 seconds, i.e. way faster.

Difftool is a perl script that creates tons of processes. Maybe it becomes slow because of antivirus activity or something.
Try experimental built-in difftool (available in the installer).

To expand slightly on Radrik5's comment, don't be put off by the "experimental" label. Dscho indicated here that it's already been accepted upstream, so this will probably be the norm staring with the next release.

Using the internal difftool is much faster indeed! Thanks for the help.

Was this page helpful?
0 / 5 - 0 ratings