-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 Bash in MinTTY ludicrously slow on Windows 10 #786
Comments
Please have a look here: https://github.com/git-for-windows/git/wiki/Diagnosing-performance-issues |
Anti virus installed? |
FWIW, I also use Trend Micro MaximumSecurity 2016 and I do not exclude the directory (or sub-directories) containing my local git repositories and I do not notice any performance issues. Also, I do not have I'm unclear, however, if you're working on a machine in a corporate environment (using Trend Micro OfficeScan, for example), where things could be impacted differently from that perspective. Definitely read through that Diagnosing Performance Issues wiki, it has some good stuff in there for helping track down what might be causing the issue--especially since its on startup of Git Bash. |
I'm having exactly the same issue with Git 2.9 64bit. I also have Trend Micros Internet Security and while it was enabled, even the installer halted at 100%, and wouldn't finish until I disabled Trend. I kept all the default installation options. Now starting Git Bash, or running any Git command takes several seconds whenever Trend is enabled. I didn't not have this problem with Git 2.7. |
@emahfoud any chance you can use the information in https://github.com/git-for-windows/git/wiki/Diagnosing-performance-issues to diagnose further? |
I have similar problems. Git v2 is so much slower than git v1. Using Windows 8/10 64 bit. Tried both git2 32 and 64 versions. Always ending up installing git1 and sticking with it. Otherwise very uncomfortable to work in command line interface. Tried all optimizations. Just cannot get HOW c++ implantation could be slower than based on sh/perl and tcl... Does anyone else has the same experience? How do you live this it? I'm ready do switch to |
@shytikov, as to Fossil, it's a nice DVCS with interesting ideas. But if you're used to staging, It's also has prettly horrible CLI interface: its web UI is awesome but if you want to not leave your console window for inspecting the history, your experience will be suboptimal at best. (The community is nice and responsive but such is that of Git, too.) ;-) |
For me |
@shytikov ranting does not fix the issue. If you are truly interested in fixing it, try to follow my earlier advice on diagnosing the slowness. Vague descriptions of some kind of perceived slow-down will achieve nothing good. |
@dscho, you're right. I'm working on proceeding with your earlier advice. And I will come back to you soon with more details. So far I can share with you my other findings. It seems that I don't know why difference is so dramatic! Once again, same PC, same |
@dscho, unfortunately, nothing interesting in all these performance diagnostic steps. I cannot tell where from that delay comes. I've tried to disable network drives, since have found when I move to office my home folder maps to network drive... Didn't helped at all. Portable version delivered with But For example when I run Do you have any vision WHY delays on Windows is encountered? Even for such a simple command as get git version, for example? |
Here is my simple
Here is results from
Here is results from
Any ideas, what it could be? |
@shytikov, you could try to somehow profile (I mean, with a suitable profiler application) your Git to try to figure out what and where is spending time. As I've already mentioned, in the context of #193, even Now, if that would be a GNU/Linux- or *BSD-based platform, I'd reach for |
@shytikov, looks like it's doable with the stock MS tools. |
Just a quick guess: your home directory is on a network drive? If so, could you try again after setting the I do agree with @kostix that it makes tons of sense to use a real profile, though. Even something like ProcMon is often good enough to identify bottlenecks. |
Will be tracing I was also thinking about network drive, but after I disconnected it — nothing changed. I also put my laptop into flight mode, results almost the same (trace was disabled):
I was setting |
I can confirm that MinTTY is ridiculously slow. Unfortunately, I cannot pinpoint exactly when this slowness started occurring or whether or not it's directly related to Windows 10, MinTTY, or both. My computer completely locked up on me yesterday, so I had to give it the "one-finger salute". Since I was forced to reboot (I usually hibernate every night), I decided it was time to install all the updates that were available since the last time I rebooted. This included the Windows 10 Anniversary Update. I also took the time to upgrade from Git for Windows 2.7.1 to the latest Git for Windows 2,9,3. Some stats on my setup:
Now that I've upgraded from Git 2.7.1, I'm noticing this slowness that's being described. I haven't gone through diagnosing performance issues according to the linked-to Wiki articles as of yet. I plan on doing this later today. When I've run through that, I'll report on my findings. I just wanted to be able to confirm that something has changed with respect to Windows 10 and/or MinTTY that has in fact caused MinTTY to become much slower. Please note that the slowness has nothing to do with Git in and of itself. It seems to be MinTTY that is slow (though I haven't ruled out that bash itself isn't the cause of the slowness, and not MinTTY). In other words, something between 2.7.1 and 2.9.3 has introduced slowness--but I have not had the time to determine the root cause. Also, when I went to close my Git for Windows session in MinTTY, by typing I began using Git for Windows 2.9.3 with a brand new Git repository, so the repository is very small, therefore, there shouldn't be a lot of overhead with any sort of " UPDATE UPDATE UPDATE UPDATE CLARIFICATION of last UPDATE FOUND SOMETHING MORE INFO I do know that the standard git-prompt uses the |
@fourpastmidnight thanks for the thorough analysis! I look forward to see how it develops from here. For the record, my Git Bash here (Windows 10 + Anniversary Update) is fast. |
@fourpastmidnight, executing programs on Windows always was known to be slow (slower than on a Linux-based system running on the same hardware) so yes, I'd try to stick with escape sequences to send ANSI colour controls to the terminal driver. |
I think it has something to do with the network... It's closest where I could get in my investigation. Right now it works fine for me, and I haven't noticed what I've done to make it work. But check do you have As I mentioned, I lost the track, but if you could do this accurately and get more information you will help guys to finally fix that problem. |
ANOTHER UPDATE I am running Windows 7 Pro on my work computer, whereas my home computer is Win 10 Pro + AU. It doesn't appear that my prompt is the root issue of the slowness on my home computer afterall. (YAY! But it still is a bit slow for my liking, so one day I'm going to look into that. Thanks @kostix for the tip on using straight up ANSI terminal codes over @dscho: To be clear, I'm not saying that this issue has anything to do with the Win10 AU in particular, as this issue was filed months in advance of that update being available (however, that's not to say that @Nathan2055 isn't a Fast Ring Windows Insider, in which case, it could be Win10 AU-specific. @Nathan2055, are you a Fast Ring Windows Insider and did you have preview bits of the AU update installed when you filed this issue?) In order to rule out more possibilites, can you tell me @dscho, did you enable the Windows Subsystem for Linux feature of the Win 10 AU? That's one thing I enabled straight after installing this update. |
LAST UPDATE FOR NOW Anyway, since this hasn't seen much other traffic since I posted my updates here and no response from @Nathan2055, I can't say that this is an "active" issue--for me anyway. |
I've been running Git For Windows 2.9.x on my home machine on Windows 10 Pro x64 w/ AU for a few months now. I experienced slowness initially after the installation--but it mysteriously went away a day later. I haven't heard anything back from anyone on this issue about whether or not they are still experiencing the sluggishness I also initially experienced, or whether or not they've tried going through the Diagnosing Performance Issues wiki page, especially from the OP. In light of that, I'm closing this issue. If anyone can definitively show that Git for Windows v2.9+ is actually and significantly slower than it's predecessors, please reopen this issue with the evidence. |
Found a workaround in here Solution to Git Bash is very slow in Windows!, it works! git config --global core.preloadindex true
git config --global core.fscache true
git config --global gc.auto 256 |
How do preloadindex and fscache relate to mintty? |
In that for most people MinTTY equals Bash equals Git prompt. When every command in the shell is followed by a delay from executing PS1, it's easy to misdiagnose what's actually slow. I assume this is the case. |
or closed issue
matching what I'm seeing
Setup
output of
git version
as well.2.9.0.windows.1, 64-bit
64-bit
defaults?
Defaults, though I enabled support for Git from default cmd.exe (not the full Unix toolset, though)
to the issue you're seeing?
I installed GitHub Desktop a few minutes before installing Git Bash, but uninstalled it because it was acting slow as well.
I also copied in a .gitconfig file as well as .ssh and .gnupg folders from my previous Windows install (Windows 7, I clean installed with 10 recently).
Details
Git Bash, AKA MinTTY
Minimal, Complete, and Verifiable example
this will help us understand the issue.
Launching Git Bash
Git Bash to open
It sits on a black screen for a very long time, apparently executing "/usr/bin/bash --login -i". When it finally loads, running any Git command takes a very long time.
Git from within stock cmd.exe runs fine and fast.
URL to that repository to help us with testing?
N/A
The text was updated successfully, but these errors were encountered: