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 status with 8GB file VERY slow (over one minute) #4983
Comments
Hey, This is definitely an issue in Git and should be reported to the Git for Windows issue tracker. Git LFS doesn't control whether My guess as to what's happening here is that this is a condition where the file is racily clean. That is, the file is actually clean, but the modification timestamp, for whatever reason, is actually the same as the index. In that case, we can't know whether the file is up to date, or if the index was refreshed immediately before the update to the file, and as such, Git needs to re-read the file. Now, how that happens is unknown. It could be you have some sort of program scanning data, such as a third-party antivirus or monitoring program that does that, in which case you should absolutely remove it and use the default Windows antivirus. Third-party antivirus and firewall programs are known to break Git in a variety of ways. It could also be that it's something else entirely and it's not a racily clean issue, but ultimately this problem, which we do see from time to time (and almost always on Windows) is an issue related to Git and is out of the control of Git LFS. So I'm going to close this, but I encourage you to reach out to the Git for Windows project at https://github.com/git-for-windows/git. The maintainers of that project know me and will ping me on your issue if they need help. |
Thanks, with your help I figured out out that my Powerline "git status" was hanging because We have a script which corrects all local timestamps for all files from the repo (submodule) where we have Git-LFS files. It was a simple matter of putting a I wonder if there's a better way than doing |
Describe the bug
Running git status is very slow if there is an 8GB file present in LFS. Files of different sizes, such as 9GB, work as expected.
Git is apparently reading back the entire 8GB file every time. This takes over 1 minute on my box.
git status never shows the file as modified. It just reads the file back every time and discovers nothing has changed.
This issue makes any command that shows file status very slow, including tab-complete and commit.
To Reproduce
Expected behavior
Git status to take less than one second.
System environment
Windows with Git-2.36.0-64-bit.exe
The problem is present on old versions as well.
Output of
git lfs env
git-lfs/3.1.4 (GitHub; windows amd64; go 1.17.8)
git version 2.36.0.windows.1
LocalWorkingDir=C:\Users\JHatton\Desktop\tmp\8g
LocalGitDir=C:\Users\JHatton\Desktop\tmp\8g.git
LocalGitStorageDir=C:\Users\JHatton\Desktop\tmp\8g.git
LocalMediaDir=C:\Users\JHatton\Desktop\tmp\8g.git\lfs\objects
LocalReferenceDirs=
TempDir=C:\Users\JHatton\Desktop\tmp\8g.git\lfs\tmp
ConcurrentTransfers=2
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=C:\Users\JHatton\Desktop\tmp\8g.git\lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic,lfs-standalone-file,ssh
UploadTransfers=basic,lfs-standalone-file,ssh
GIT_EXEC_PATH=C:/Program Files/Git/mingw64/libexec/git-core
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"
Additional context
Any other relevant context about the problem here.
The text was updated successfully, but these errors were encountered: