-
Notifications
You must be signed in to change notification settings - Fork 534
worktree.Checkout() causes disk thrashing #758
Comments
Not sure about the disk thrashing, but checking out a branch is tremendously slow for me. |
Any update on this? If i wait long enough checkout happens, but its unusably slow. It's as if its reading every file in the directory tree. |
Still seeing this issue, checking out a branch is unusably slow. (expected error due to unstaged changes)
(clean tree)
See attached pprof cpuprofile and svg rendering. |
running dtrace, to see a little bit more about the fs access that's going on, I noticed that the process is reading every single file in the workdir, even untracked files such as large distribution binaries. Given that my workdir is several GB due to build artifacts, that could explain why it takes so long. Removing any build artifacts, 2.6GB -> 333MB in my work dir. This resulted in much faster performance. Does it make sense then, to skip files ignored via
|
To consider the After a little debugging i found that https://github.com/src-d/go-git/blob/master/worktree.go#L409 |
Yep, that's visible in the profile results I attached previously. Even respecting .gitignore it was a bit slow, but usable at least. |
On macOS 10.13.3 and go 1.10, it seems that calling worktree.Checkout is causing major (GBs) of disk thrashing trying to switch to a branch. Not really sure why.
Anyone else experiencing this same behavior?
The text was updated successfully, but these errors were encountered: