SourceTree is running very, very, slow at times. Restarting it seems to work temporarily, but it's still quite a nuisance, specially when I have to do it every couple of ours. When ST starts slowing down, I also see the CPU usage rising to 80%-300%.
I'm using SourceTree 18.104.22.168 now, but it was also happening with 1.5.7.
Your clue was in your second-to-last sentence (around 13,000 untracked files). This is a Git problem rather than a SourceTree one. There are two solutions to this problem
It's a Git performance problem from the looks of it.
Have a try and let us know how you get on. Cheers!
how do i do what you recommend? "Use the 'Show Modified' filter - this is the same as 'Show Pending' except it omits untracked files." mine is so slow i cannot even get to options and file menu items without it taking an hour. when you explain something, can you take a second to state the click path?
Ok sorry. Is it OK that we continue this thread even if I'm talking about the Windows version?
I've created a reproducable (at least on my computer) recipe. Please enter these commands from a windows command linewith git support:
git clone https://android.googlesource.com/platform/frameworks/volley cd volley echo Hi > src\com\android\volley\Request.java echo Hi > build.xml
Then start sourcetree, goto master branch and the "uncommited changes" point. The two files build.xml and Request.java should be listed under "Working copy changes". Select build.xml. Press the up-arrow.
At this point my computer uses from ~500 to 1000ms to process the diff. In this timespan, pressing the down-arrow will not trigger any reaction from sourcetree, but will trigger after the diff is presented. If I repeat the process by alternating between up-and down-arrow int he window, the delay is even more obvious.
I have noticed a correlation between the size of the source file and the length of processing (Request.java is some ~18kb). Yet there are two things make me say that this shouldn't take that long:
My computer specs are:
Intel Core i5-2467M @ 1.60 GHz . 6GB RAM. Windows 8. (Toshiba laptop Z830).
I'm beginning to think that Source Tree is just very slow full stop, I have one repository maybe a couple of thousand files yet source tree just goes awol every time I do anything.
Git works like a dream on the same repository under Linux
Maybe its just me but the same things which take 10 seconds on Linux (command line) seem to take about 1-2 minutes on Windows with Source Tree
Seems like no improvement in performance has happened in the past 3 years. SourceTree is still so slow it's almost unusable. Don't know what it is doing in the background all the time. Going thru all files or what? And why is it doing all this in the main thread blocking the UI?
Using version 2.1 in OS X with Core i7 3.1GHz, 16GB of RAM and SSD...
It's a 2.3GHz Core i5 Macbook Pro. 8GB of RAM. And I currently have around 95GB free disk space.
I do have a few repositories. 17, to be more specific. 16 git and 1 mercurial.
This might have started with a ST update, but I can't say for sure. I can try using a version older than 1.5.7 if you still have them for download.
It's worth a shot if you can reproduce it, that'll really help us narrow it down if that's the case. Here's the link: http://downloads.atlassian.com/software/sourcetree/SourceTree_1.5.7.dmg
Thanks very much
Version 1.5.6 is showing the same symptoms :(
Even when ST's windows is in the background, I frequently see it taking up 100% of the CPU.
I've also tried checking if there's a relation between the slowness, and disk activity (as reported by Activity Monitor), but I could establish none.
Also, ST is currently taking 1.13GB of memory (which is more than my IDE). Is this to be expected?
Anything else I can do to sort this out?
OK, 17 repositories should be fine, it may be to do with what you're doing with those repo's. Sorry for all the questions, it helps us narrow it down. Some more: are you using any particular views when this is happening, if so, which ones? Do you have 'All Files' selected? Are you using large selections with lots of large diffs or selecting ignored/clean/untracked files?
I usually have only two windows open. The bookmarks window and the window for the project that I'm working on. I can't establish a clear relation between the view I'm at and the slowness. But there are two situations in which I see this issue happening more often: a) when I have the "Uncommited changes" selected in the top panel, and start selecting some modified files (one at a time) to see what my latest changes were, and b) when I open up the commit dialog.
Then again, these are the features that I use more often, so not having felt all the slowness when working with other features of ST may not really mean anything. I spend ~80% of the time is the log view.
Do you have 'All Files' selected?
You mean, if I select all the files in the "Files in the working tree" pane? If so, no.
Are you using large selections with lots of large diffs
No, not really
or selecting ignored/clean/untracked files?
Not really either. But I do have a lot of untracked files in the project that I have been working on recently (around 13000).
PS: Sorry for the delay in answering back, I had to focus my attention on something else in the last 2 days, but I appreciate your help in trying to sort this out.
By default SourceTree displays files with a filter it calls 'Show Pending', which includes both modified files and untracked files. Unfortunately git itself really starts to slow down when you have a lot of untracked files - usually you don't want to keep lots of untracked files around and you want to ignore them or add them (otherwise it gets hard to see the wood for the trees). However, if for some reason you want to keep all these untracked files sitting in your repo, you can speed up SourceTree by selecting the 'Show Modified' filter instead for the majority of the time. This is a lot faster because it avoids the slow call to list untracked files.
I am using 1.7.3 on MacOS and I have the same issue. When returning to SourceTree from another program I will often have to wait a minute or more while SourceTree grinds away at something. It uses all available CPU and basically makes my whole machine unusable while this is happening. I do not have lots of untracked/unignored files. I have 20 or so git repos, but only one or two windows open at any given time. I can fix this temporarily by restarting, but even getting SourceTree to quit in those times is a painfully slow process.
I use SourceTree and have the same problem. After launch it seems good, but after 3-4 hours SourceTree freezes everywhere even between switching tabs.
I will try to record a video which will demonstrate the issue.
I use windows version 22.214.171.124 and my filter was setted up to 'Show pending'. I don't have many untracked files and have only 7 reps.
This is actually a different issue (Windows specific) - with all the features that have been added to get us to 1.0 on Windows we haven't had chance to spend time simply profiling to catch things like this - we're addressing that now. I've already managed to speed a great number of things up for the next Windows update (1.0.5), and I intend to try to find some more before that release next week. We'll be improving things all the time; it's still fairly early days for the Windows release.
SourceTree 1.5.6 was slow for me too on a but I managed to get SourceTree to perform a lot faster by doing the following:
I'm too lazy to figure out which specific one made it faster or whether it was a combination of these settings, but perhaps Atlassian could look into this. Hope it helps. SourceTree was much slower than the latest version of GitX (rowanj's fork) until I made these changes. I also disabled backups on destructive operations but noticed it made no difference when I re-enabled it.
My specs: MacBook Pro 15" late-2011 2.2GHz i7 with 8GB RAM.
p.s. the moderators might want to merge this thread with this other one.
1.5.6 is the MAS version. We're no longer allowed to publish to the MAS anymore, the latest version is 126.96.36.199 available on our website.
Regardless of that, your input is very useful, thanks for the insights. I am planning on performance maintenance in the near future. Our Windows client recently got a major speed boost due to investing in performance maintenance a bit more.
Most of the background checking / threading tasks took months to get right. Some people have very large repositories or very slow remotes. One major factor contributing to poor performance are repositories with lots of untracked files in them which aren't added to an ignore list, or where SourceTree's log preferences aren't set to view only tracked files. SourceTree has to call Git, and Git has to do a load of checks on the untracked files causing response to be very poor (because we're asking Git for the information).
I've created an issue here outlining what steps we should take. The first two would make more sense, and the last is imperative also. https://jira.atlassian.com/browse/SRCTREE-1706
Thanks for your reply. I had no idea you were not publishing to the MAS anymore. Looks like I missed the recent blog articles about the sandbox issues.
I'm now trying out version 188.8.131.52 and have also reverted the preferences changes I did to know if it makes a difference (still using a fixed-width font for commit messages though).
You might be right about SourceTree being slow when there are a lot of untracked files that are not ignored. However I face this issue regularly not because I'm not ignoring files which should be ignored (in fact I'm quite zealous of keeping my working files list clean), but because I sometimes add folders containing many files which I need to commit later - for example vendor JS libraries. Renaming a folder that contains a lot of files that's already committed will also create a long list of working files. So this might actually be a regular use case that isn't actually due to a neglected gitignore file.
That said, I'll keep using the latest version and report back if there's anything noteworthy. Thanks for making such a great Git client and on top of that, releasing it for free.
Hi guys, came here from googling "Sourcetree cpu usage". Mine is very slow now when switching between uncommited & unstaged files. Suggestion: Dont do the file-compare on the UI thread. It seems as if it is happening now (haven't looked at the code). One should be able to quickly select mulitple files in the "Working Copy changes" pane without having to wait for the result of the Diff-view..
That said... Why are you guys talking about v1.5+? Isn't the latest verson as of Jan 23 2014 v1.3.3?
This thread is about the Mac version, hence the version numbers.
We definitely don't do the file compare on the UI thread, we're very careful when it comes to this and lots of testing is involved. It's a relatively obvious thing to perform actions like this on background threads.
We'd need more details to diagnose your issue. If the diff's are big, or lots of files are selected this is usually a result of Git taking a long time to respond.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs