Reputation: 1099
While running SourceTree, periodically (ie multiple times per day), I notice that my computer is running slowly and that git is using lots of CPU (> 90%). There is no visible activity in SourceTree, and I'm not actively using it.
I'm running the lastest version of SourceTree (2.0.5.2) and git (v2.5.0). Mac OS/X Yosemite on a Macbook Air.
I'm curious to know if others see this, or if it is an anomaly of my system / configuration.
Thanks!
Upvotes: 1
Views: 2685
Reputation: 329
For me the consumption of CPU was caused by the fact that SourceTree was doing diffs on big files such as package.json (25k+ lines and complex structure).
A possible fix to that would be to set an ignore file from the settings of SourceTree, section "Diff", then "Ignore File Pattern".
Upvotes: 0
Reputation: 1099
Okay, I found the problem. I ran lsof | grep <git pid>
and noticed that the pwd was set to my home directory, and that I had a long forgotten git repository in my home root.
So every couple of minutes, SourceTree was running git status against everything in my home directory.
It's a mystery why SourceTree was running git there though, since I didn't have that git repo open in SourceTree.
I'll file a bug against SourceTree.
Thanks!
Upvotes: 3
Reputation: 54457
It's possible that you're seeing SourceTree checking your repositories for incoming changes. By default, it's fetching incoming changes from the configured default remote for each of your projects. Depending on the number of projects, and the size of your repositories, this could be one of the reasons for the symptoms you're seeing.
You can disable (or change) this behavior from SourceTree > Preferences > General
, there's a setting called Check default remotes for updates every X minutes
, with 10 minutes being the default:
Please try disabling this setting (and potentially the one above, Refresh automatically when files change
) to see if it improves the situation.
Upvotes: 3