Skip to content
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

git difftool with visual editor takes 4.5 seconds to open next file #4998

Open
HassanAhmadAli opened this issue Jun 5, 2024 · 1 comment
Labels

Comments

@HassanAhmadAli
Copy link

i configured a gui application to be used with git core.editor "vscode" , the application work perfectly as a git mergetool but it takes 4.5 second or more to switch to the next file when running 'git difftool', the issue is not only with vscode as i tried other visual code editors and all of them take long time, but the command runs extremely fast with cli based applications.

then...

i tried using git with wsl in windows and set vscode as the default code editor for git and it takes fraction of a second to switch files git difftool.
both on the same machine git with wsl is very much faster with GUI than git for windows

running git at the last current version , the issue exist with older versions also

@dscho
Copy link
Member

dscho commented Jun 6, 2024

While git difftool is a builtin written in C, it spawns git difftool--helper, which is a Unix Shell script.

As a consequence, we must expect a certain degree of slowness: Unix Shell scripts are just not a native thing on Windows and the involved emulation takes time (see here for a fuller explanation of the complexities).

Having said that, you could use the set -x trick to analyze what things are going slowly.

@dscho dscho added the unclear label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants