Skip to content

git difftool is extremely slow #1057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
Snaptags opened this issue Feb 10, 2017 · 4 comments
Closed
1 task done

git difftool is extremely slow #1057

Snaptags opened this issue Feb 10, 2017 · 4 comments

Comments

@Snaptags
Copy link

Snaptags commented Feb 10, 2017

  • 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

@Snaptags
Copy link
Author

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

@Radrik5
Copy link

Radrik5 commented Feb 10, 2017

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).

@landstander668
Copy link

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.

@Snaptags
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants