SourceTree is very slow and never loads my repositories; after 10 minutes is using 500MB of memory
Asked by Matthew S:

**Specs:**

* SourceTree Version: 1.9.10
* Operating System: Windows 7 Home 64-bit
* Hard Drive (Free Space): 500GB SSD (381GB free space)
* RAM: 8GB
* CPU: Intel Core i7-2640M at 2.80GHz
* Computer: Lenovo ThinkPad T520

**Issue:**

I have tried using older versions and newer versions of SourceTree, and the problem occurs on those versions as well. My Git repositories are working fine on a command line. I have tried searching for others experiencing this same issue, but I have not found any who are.

When I load SourceTree, I am met with a blank tab and the program trying to load from this blank tab. Adding in existing repositories to SourceTree is incredibly slow, taking around ten minutes to add the repository. SourceTree is also very slow in loading the commit history of any repository tab I click. Essentially, performing any action in SourceTree is extremely slow.

![sourcetree.jpg](/t5/image/serverpage/image-id/14186i3DEB1DE2A9A7D3E9/image-dimensions/559x404?v=v2 "sourcetree.jpg")

In Window's Task Manager, SourceTree uses around 68,000KB of memory around one minute after opening the program. After ten minutes of opening SourceTree, it is using over 500,000KB of memory.

**1 minute after opening SourceTree:**

![task1min.jpg](/t5/image/serverpage/image-id/14187i24D2DD45647F74C6/image-dimensions/411x476?v=v2 "task1min.jpg")

**10 minutes after opening SourceTree:**

![task10min.jpg](/t5/image/serverpage/image-id/14189i9FE769CE1E2B7A30/image-dimensions/414x480?v=v2 "task10min.jpg")

**Things I have tried:**

* Upgrading to the latest version of SourceTree
* Downgrading to an older version of SourceTree
* Uninstalling and reinstalling my current version (1.9.10) of SourceTree
* Searching for others experiencing the same issue (found no matches)
* Deleting repositories from hard drive and cloning them again
* Deleting only the repositories' bookmarks and adding the bookmarks again

Please help me!


Answers:
author: Mike Corsaro
body: Hello! I suspect that you're loading in a huge repo (note the 4 git processes running in task manager that have not finished!). To see what's taking so long, could you try the following?

* Open the **newest** version of Sourcetree
* Before adding or opening your repo, go to "Tools \> Process Viewer..."
* Open your repo, and observe which operation continues to run in the Process Viewer

comments: author: Matthew S
body: I performed the actions you mentioned. At first, the processes were very quick, each taking less than a second to complete. Then, however, I noticed two processes that never stopped trying to complete. Finally, those processes stopped and new processes began popping up, identical to the previous ones, and these new processes also never stopped trying to complete.

```
[
 {
 "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false status --porcelain --untracked-files=all --ignore-submodules=dirty",
 "Directory": "C:\\",
 "Status": "Running",
 "Duration": "00:00:59.5990000",
 "CallerContext": "GetStatusProcess",
 "Output": null
 },
 {
 "Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false status --porcelain --ignore-submodules=dirty --untracked-files=all",
 "Directory": "C:\\",
 "Status": "Running",
 "Duration": "00:00:56.5650000",
 "CallerContext": "GetFileStatus",
 "Output": null
 }
]
```

![processes.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/14535iC0BD4B22D8D4C3DB/image-dimensions/445x412?v=v2 "processes.jpg")


author: Mike Corsaro
body: Ah ha! Okay, so it looks like the reason why it takes so long is because ***your entire C:\\ drive*** is a git repository (note how the path is 'C:\\')! This means that any file change **anywhere** on your harddrive will be indexed and monitored by git.


author: Matthew S
body: Wow, I feel dumb! I must have accidentally put it there and not noticed it. Thank you so much for your help!