Bug: TortoiseMerge starts very slow under Windows 10 version 1709

3,857 views
Skip to first unread message

MH

unread,
Oct 19, 2017, 8:43:16 AM10/19/17
to TortoiseSVN
Hi Tortoise Developers,

first, thanks for Tortoise, it is an excellent tool!

Unfortunately after upgrading my system to Windows 10 version 1709 I am experiencing performance problems at startup of TortoiseMerge. All the other Tortoise tools continue to work perfecly.

TortoiseSVN version : 1.9.7

Problem:
When I e.g. select "Diff" it talkes about 10 seconds for a small file until the TortoiseMerge window shows up and displays the content. Also in the time until it starts up it fully uses one CPU core.

Expectation:
When I used Windows 10 version 1703 the same procedure took less then 1 second on the same system. I also used the same version of TortoiseSVN. So it would be very nice to get the same performance in the newest windows version, since I am using TortoiseMerge very often and also for a lot of files at a time.

It would be nice to get this bug fixed soon.

Thank you very much,
Mario

come.d...@gmail.com

unread,
Oct 20, 2017, 3:32:24 AM10/20/17
to TortoiseSVN
Hi,

Same problem after upgrading to Windows 10 Fall Creator Update.

TortoiseMerge fully uses one CPU core, and it takes about 30 seconds before the windows shows up. With Windows up to 10 Creator Update it just took 1 second.

Best regards,
Côme

Stefan

unread,
Oct 20, 2017, 3:39:22 AM10/20/17
to TortoiseSVN
Try updating your display driver.
I can see the issue on the PC in my office which has an older driver in use, but not on my private PCs and Laptops where I can update the drivers myself.
So I think it has something to do with that.

MH

unread,
Oct 20, 2017, 4:28:45 AM10/20/17
to TortoiseSVN
I have updated the display driver for my Nvidia Quadro M4000 to the latest version 387.95 using the package "387.95-quadro-grid-desktop-notebook-win10-64bit-international-whql".

Unfortunately this did not change much.

come.d...@gmail.com

unread,
Oct 20, 2017, 4:30:26 AM10/20/17
to TortoiseSVN
I already have the last driver from NVIDIA: 387.92 released on Mon Oct 09, 2017

I use a GeForce GT 1030 with one 4K screen on DP, 200% zoom and one 1920x1200 screen on HDMI with no zoom.

come.d...@gmail.com

unread,
Oct 20, 2017, 7:53:06 AM10/20/17
to TortoiseSVN
It definitively seems to be a graphical issue: when I click on the button on the upper left of the window to open the menu, it takes 25 seconds to appear with full CPU load.

Stefan

unread,
Oct 24, 2017, 2:20:14 AM10/24/17
to TortoiseSVN

come.d...@gmail.com

unread,
Oct 24, 2017, 3:44:07 AM10/24/17
to TortoiseSVN
I just updated NVIDIA driver to 388.00 and it is now much faster, but steel not as fast as before.

Now using the "diff" command between two simple text files take 9 seconds with full CPU load. Before it was 30+ seconds.

come.d...@gmail.com

unread,
Oct 24, 2017, 8:46:05 AM10/24/17
to TortoiseSVN
As a workaround it is possible to disable the ribbon in TortoiseMerge: go to settings and uncheck "Use Ribbons". TortoiseMerge starts much faster, below 1 second.

stepand76

unread,
Oct 24, 2017, 5:34:00 PM10/24/17
to torto...@googlegroups.com
Unfortunately updating drivers doesn't help. Disabling ribbons doesn't help. Any hints?

come.d...@gmail.com

unread,
Oct 25, 2017, 3:15:25 AM10/25/17
to TortoiseSVN
You can try to use WinMerge instead of TortoiseMerge as a workaround. In TortoiseSVN goto "Settings" and "Diff Viewer".

Protoster

unread,
Oct 25, 2017, 11:33:36 AM10/25/17
to TortoiseSVN
+1, having this issue as well. Disabling ribbon speeds it up a bit, but not to original level.

stepand76

unread,
Oct 29, 2017, 4:03:48 AM10/29/17
to TortoiseSVN
It is not only related to TortoiseMerge. For example showing TSVN Settings - General - Colors takes 15 seconds on my laptop...

stepand76

unread,
Oct 29, 2017, 10:08:37 AM10/29/17
to TortoiseSVN
After I switched off ribbons and restarted Windows it seems to be OK. Sorry for confusing.

3dks...@gmail.com

unread,
Oct 30, 2017, 12:23:26 PM10/30/17
to TortoiseSVN
> As a workaround it is possible to disable the ribbon in TortoiseMerge: go to settings and uncheck "Use Ribbons". TortoiseMerge starts much faster, below 1 second.

Where i can find the "Use Ribbons" checkbox?

stepand76

unread,
Oct 30, 2017, 3:30:13 PM10/30/17
to TortoiseSVN
In the TortoiseMerge settings.

3D-Kstudio

unread,
Oct 30, 2017, 3:46:27 PM10/30/17
to TortoiseSVN

> As a workaround it is possible to disable the ribbon in TortoiseMerge: go to settings and uncheck "Use Ribbons". TortoiseMerge starts much faster, below 1 second.

Where i can find the "Use Ribbons" checkbox?




 

Yuri Kravchenko

unread,
Nov 16, 2017, 7:43:59 AM11/16/17
to TortoiseSVN
Hi. I have applied the workaround from that disscustion (https://developercommunity.visualstudio.com/storage/attachments/16873-edits-to-afxtoolbarimages.txt) to TortoiseMerge, and got at least a 10-fold decrease in the load time of the application.
No longer used slow GetPixel function. It starts up like a lightning.
There is my patch for TortoiseMerge.cpp: http://thmod.com/downloads/TortoiseMerge.cpp.patch.txt
Similarly I did for TortoiseProc.cpp.
I know that this is hack, but I haven't found another way to apply yet. Due to Tortoise SVN "Use MFC in a Shared Dll" build option.

Stefan

unread,
Nov 16, 2017, 2:01:54 PM11/16/17
to TortoiseSVN
Thanks, but I don't like this solution since it requires live-patching - virus scanners will go completely bonkers with this and we will have much more serious problems than just a slow start...

Stefan

Ivan Zhakov

unread,
Nov 16, 2017, 3:52:28 PM11/16/17
to TortoiseSVN on behalf of Yuri Kravchenko
On 16 November 2017 at 15:43, Yuri Kravchenko via TortoiseSVN
<tortoisesvn+APn2wQfRWJhSuppkpGSl...@googlegroups.com>
wrote:
TortoiseSVN 1.9.99 (nightly builds) [1] uses native ribbon framework
instead of MFC, so no delays on TortoiseMerge startup.

[1] https://nightlybuilds.tortoisesvn.net/latest/

--
Ivan Zhakov

Yuri Kravchenko

unread,
Nov 16, 2017, 7:28:31 PM11/16/17
to TortoiseSVN
Unfortunately, the profiler does not think so.
You are still using CMFCRibbonButton and CMFCMenuBar classes, which are inherited from CMFCToolBar, which uses GetPixel. And maybe several other classes also use it.
The problem with GetPixel is also that in the last Windows update, the more system uptime, the slower it is. Perhaps this is caused by a leak of system resources due to some kind of error in the update.
Therefore, at least one object that uses it, is enough to make the program run unacceptably slowly.
But I understand that such a hack is not suitable for public use. I'm trying to find another way.

Ivan Zhakov

unread,
Nov 18, 2017, 2:59:01 AM11/18/17
to TortoiseSVN on behalf of Yuri Kravchenko
On 17 November 2017 at 03:28, Yuri Kravchenko via TortoiseSVN
<tortoisesvn+APn2wQfRWJhSuppkpGSl...@googlegroups.com>
wrote:
What version did you try? Did you enable ribbons for TortoiseMerge?
The should be fixed in 1.9.99. r28027 or later:
https://sourceforge.net/p/tortoisesvn/code/28025

CMFCRibbonButton is only used for status bar indicators, but they
don't have images so they cannot be reason for slow down.

PS: TortoiseMerge nightly works really fast on my Windows 10 with QHD display.

--
Ivan Zhakov

Yuri Kravchenko

unread,
Nov 18, 2017, 7:31:06 AM11/18/17
to TortoiseSVN
What version did you try? Did you enable ribbons for TortoiseMerge?
I'm using 28042, and don't use ribbons, they take up too much space.
CMFCToolBar also used in ResizableLib.

Ivan Zhakov

unread,
Nov 18, 2017, 9:55:30 AM11/18/17
to TortoiseSVN on behalf of Yuri Kravchenko
On 18 November 2017 at 15:31, Yuri Kravchenko via TortoiseSVN
<tortoisesvn+APn2wQfRWJhSuppkpGSl...@googlegroups.com>
wrote:
>> What version did you try? Did you enable ribbons for TortoiseMerge?
>
> I'm using 28042, and don't use ribbons, they take up too much space.
> CMFCToolBar also used in ResizableLib.
>
Do you have slowdowns with ribbons enabled?

--
Ivan Zhakov

Yuri Kravchenko

unread,
Nov 19, 2017, 9:17:15 PM11/19/17
to TortoiseSVN
Yes, i have.
And visually I don't see the difference in the start-up time between using ribbons and without them.
Running TortoiseMerge.exe without parameters, with ribbons turned on, takes about 10 seconds to display the windows.
There is the diagnostic session, generated by perfomance profiler in VS2017:
GetPixel takes 90% of the time.
But with my patch applied, it starts in 1 seconds. And I don't see GetPixel calls in profiler log at all.

As far as I know, this slowdown does not happen on every computer. On my home laptop, I don't see it (however, I have not yet installed 1709 update on it).
But a large number of complaints on completely different configurations makes this problem important enough to pay attention to it.

Ivan Zhakov

unread,
Nov 20, 2017, 2:32:16 AM11/20/17
to TortoiseSVN on behalf of Yuri Kravchenko
Hi Yuri,

Thanks for diagnostic session, but I'm unable to decode it without
debug symbols. Could you please post call stack to GetPixel() in
TortoiseMerge when Ribbons are enabled. I'd like to disable usage of
CMFCToolbarImages completely in Ribbon mode.

On 20 November 2017 at 05:17, Yuri Kravchenko via TortoiseSVN
<tortoisesvn+APn2wQfRWJhSuppkpGSl...@googlegroups.com>
wrote:
> --
> You received this message because you are subscribed to the Google Groups
> "TortoiseSVN" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tortoisesvn...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tortoisesvn/97c1e34a-4d45-43e6-bcf1-50c334cc3018%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Ivan Zhakov

Ivan Zhakov

unread,
Nov 20, 2017, 3:10:17 AM11/20/17
to TortoiseSVN on behalf of Yuri Kravchenko
I've checked code and found that calls to
CMFCToolbarImages::UpdateInternalImage() also triggered by
CMFCRibbonStatusBar. I think it should be possible to get rid of this
code by adding CMFCRibbonBaseElement derived class that will use
native ribbon api. I'm going to try this approach today and post
update here.
--
Ivan Zhakov

Panu

unread,
Nov 20, 2017, 11:21:02 AM11/20/17
to TortoiseSVN
On Thursday, 19 October 2017 15:43:16 UTC+3, MH wrote:
> Hi Tortoise Developers,
>
>
>
> first, thanks for Tortoise, it is an excellent tool!
>
> Unfortunately after upgrading my system to Windows 10 version 1709 I am experiencing performance problems at startup of TortoiseMerge. All the other Tortoise tools continue to work perfecly.
>
> TortoiseSVN version : 1.9.7
>
> Problem:
> When I e.g. select "Diff" it talkes about 10 seconds for a small file until the TortoiseMerge window shows up and displays the content. Also in the time until it starts up it fully uses one CPU core.
>
> Expectation:
> When I used Windows 10 version 1703 the same procedure took less then 1 second on the same system. I also used the same version of TortoiseSVN. So it would be very nice to get the same performance in the newest windows version, since I am using TortoiseMerge very often and also for a lot of files at a time.
>
> It would be nice to get this bug fixed soon.
>
> Thank you very much,
> Mario

If you want the old performance back with any application with GetPixel() "problem", curse MS and follow the instructions here (first post):
https://www.tenforums.com/performance-maintenance/96792-fall-creators-update-poor-performance-lagginess-fix.html

Short summary: Windows Defender settings (even if you're running another AV!), Set Control flow guard (CFG) to OFF.

- Panu

Yuri Kravchenko

unread,
Nov 20, 2017, 10:41:31 PM11/20/17
to TortoiseSVN
Short summary: Windows Defender settings (even if you're running another AV!), Set Control flow guard (CFG) to OFF.

It did not help me, i have the slowdown with CFG turned off.
And as far as I know, control flow guard protection works only in applications that are compiled to use it.
So the advice to turn it off is a kind of "viral fix". Many people turn it off, reboot and see that applications have started to work a little bit faster, although this is only due to the fact of rebooting.
The only difference I noticed when disabling CFG, is that Hyper-V stopped working.

Yuri Kravchenko

unread,
Nov 20, 2017, 11:29:34 PM11/20/17
to TortoiseSVN
Could you please post call stack

I set breakpoints on these two functions using GetPixel. And with Ribbons enabled, i get this call stack:
TortoiseMerge.exe!MyTool::My_MapBmpTo3dColors(HBITMAP__ * & hBmp, int bUseRGBQUAD, unsigned long clrSrc, unsigned long clrDest)
or
TortoiseMerge.exe!MyTool::My_UpdateInternalImage(int nIndex)
followed by
[External Code]
[Inline Frame] TortoiseMerge.exe!CPaneDialog::Create(CWnd *) Line 46 C++ Symbols loaded.
[Inline Frame] TortoiseMerge.exe!CLocatorBar::Create(CWnd *) Line 42 C++ Symbols loaded.
TortoiseMerge.exe!CMainFrame::OnCreate(tagCREATESTRUCTW * lpCreateStruct)
[External Code]
TortoiseMerge.exe!CTortoiseMergeApp::InitInstance() Line 543 C++ Symbols loaded.

You can easily do the same to track all calls if you apply my patch for a while.

Yuri Kravchenko

unread,
Nov 22, 2017, 7:07:49 PM11/22/17
to TortoiseSVN
After 6 day of windows uptime, the slowness returns to TortoiseMerge. It has 10 seconds start up again, even without GetPixel.
This is ridiculous.

Yuri Kravchenko

unread,
Nov 22, 2017, 9:13:07 PM11/22/17
to TortoiseSVN
Profiler now shows that the SetPixel loads CPU.
I've tottaly remove pixel convertation code MapBmpTo3dColors and UpdateInternalImage.
Now the background color of the buttons slightly does not match the color of the toolbar, but it starts up again instantly.
I keep watching.

Ivan Zhakov

unread,
Nov 24, 2017, 12:53:18 AM11/24/17
to TortoiseSVN on behalf of Yuri Kravchenko
On 20 November 2017 at 11:09, Ivan Zhakov <chem...@gmail.com> wrote:
> I've checked code and found that calls to
> CMFCToolbarImages::UpdateInternalImage() also triggered by
> CMFCRibbonStatusBar. I think it should be possible to get rid of this
> code by adding CMFCRibbonBaseElement derived class that will use
> native ribbon api. I'm going to try this approach today and post
> update here.
>
Unfortunately CMFCRibbonStatusBar is tightly coupled and can be replaced easily.

But it seems switching off status bar in TortoiseSVN nightly should
improve performance on Windows 10 with Control Flow Guard enabled.
--
Ivan Zhakov

Yuri Kravchenko

unread,
Nov 24, 2017, 3:37:11 AM11/24/17
to TortoiseSVN
But it seems switching off status bar in TortoiseSVN nightly should
improve performance on Windows 10 with Control Flow Guard enabled.
 
CMFCToolBar also used by LocatorBar in TortoiseMerge. And option to turn it off (in menu) doesn't work properly.
After restart app, it turned on automaticly.
I tried to totally disable the LocatorBar in the code, but I didn't succeed.

ime...@gmail.com

unread,
Nov 24, 2017, 7:57:17 AM11/24/17
to TortoiseSVN
We've had the same problem in our application.

However we discovered that the slow GetPixel/SetPixel calls in ::UpdateInternalImage(int index) were used only in this case (index == 1) and the results of the function weren't even used in our application.

So we skipped the calls in this case completely (if (index == 1)).

ISDVT

unread,
Dec 14, 2017, 6:02:57 AM12/14/17
to TortoiseSVN
In my company, we have the same problem, and on my computer, using version 1.9.9 (nightly built), it is quick at the beginning and after some hours work, it takes several seconds to open tortoiseMerge, but also other windows like changed files dialog for example.
Tortoise is a superb tool, but using it becomes unnerving with this slowness.
Thank-you in advance for finding the solution quickly!

Stéphane

Mapledropbear

unread,
Dec 15, 2017, 6:54:34 AM12/15/17
to TortoiseSVN

I also get this with the creators update. 

zgub...@gmail.com

unread,
Dec 15, 2017, 4:19:42 PM12/15/17
to TortoiseSVN

erkanerd...@gmail.com

unread,
Jan 8, 2018, 12:42:37 PM1/8/18
to TortoiseSVN
Hi i have same problem. I have TortoiseSvn v 1.9.7.27907. And system windows 10.
When i trying compare with base it opens min 30 secs. On my friends computer opening less than 10 secs. If i click more than one file to compare with base it takes more than 5 minute. How can i solve this problem. I couldn't find the ribbon on settings. (Sorry about my english)
Thanks for helps.
Message has been deleted

David Polhill

unread,
Jan 16, 2018, 11:03:56 AM1/16/18
to TortoiseSVN
Same as Victor. Best answer in the comments above is to use WinMerge

vma...@gmail.com

unread,
Jan 16, 2018, 9:02:00 PM1/16/18
to TortoiseSVN
Here is what helped in my case:

1 Disable CFG
2 Disable Ribbons
3 Install fresh tortoise from nightly builds
4 Disable all third-party services. Especially intel and realtek.

All those measures helped only together

cgty...@gmail.com

unread,
Jan 23, 2018, 11:07:18 AM1/23/18
to TortoiseSVN
Guys,

It's been over 3 months now since this bug has been reported. This is a total killer on productivity that makes TortoiseMerge almost unusable. Yes, MS did a crappy job of dumping this on you, but you gotta fix this ASAP.

Stefan

unread,
Jan 23, 2018, 12:15:14 PM1/23/18
to TortoiseSVN


On Tuesday, January 23, 2018 at 5:07:18 PM UTC+1, Conrad wrote:
Guys,

It's been over 3 months now since this bug has been reported.  This is a total killer on productivity that makes TortoiseMerge almost unusable.  Yes, MS did a crappy job of dumping this on you, but you gotta fix this ASAP.

There's no way to fix this in TMerge. At least not without a very ugly hack that would lead to a whole lot of other problems.
MS will have a fix available on Jan 30. See also here for more details:

David Balažic

unread,
Jan 26, 2018, 7:17:23 AM1/26/18
to TortoiseSVN
Hi!

Just an info point, if not posted already:

This is also a problem on Windows 7 (Enterprise SP1 64 bit) , TSVN 1.9.7
TMerge takes 2 seconds to open, for simple text files. During this one CPU core is at 100%.

Disabling ribbons (in Settings of TMerge) helps, then it is almost instantaneous. Almost.

Regards,
 
Message has been deleted

Ilya Matveev

unread,
Feb 1, 2018, 11:05:37 AM2/1/18
to TortoiseSVN
Try to install just released KB4958258 (Windows 10 1709 16299.214), I hope problem is gone. tortoiseMerge start faster, intensive working in one windows session during 6 hours not lead to slowdown.

Before this update at the end of working day tortoisemerge can start very slow - 3..6 sec. Also before update, I periodically made log off and log in, in new session tortoisemerge start mush faster.

Conrad

unread,
Feb 1, 2018, 1:47:13 PM2/1/18
to TortoiseSVN
Seems to be fixed now with this update.

slow...@gmail.com

unread,
Feb 2, 2018, 7:53:35 AM2/2/18
to TortoiseSVN
在 2018年2月2日星期五 UTC+8上午12:05:37,ilya matveev写道:
> Try to install just released KB4958258 (Windows 10 1709 16299.214), I hope problem is gone. tortoiseMerge start faster, intensive working in one windows session during 6 hours not lead to slowdown.
>
> Before this update at the end of working day tortoisemerge can start very slow - 3..6 sec. Also before update, I periodically made log off and log in, in new session tortoisemerge start mush faster.

It should be KB4058258

AtOmXpLuS

unread,
Oct 27, 2019, 3:33:25 PM10/27/19
to TortoiseSVN
Message has been deleted
Message has been deleted

Suman Martha

unread,
May 27, 2020, 3:21:28 AM5/27/20
to TortoiseSVN

Hi, 
Even Iam facing below issue. 
Reply all
Reply to author
Forward
0 new messages