Outlook is slow to load when COM Add-in is installed (Outlook 2010 / 32 bit)

Add-in Express™ Support Service
That's what is more important than anything else

Outlook is slow to load when COM Add-in is installed (Outlook 2010 / 32 bit)
 
Chris McA




Posts: 58
Joined: 2014-01-21
Hi,

I have created a COM Add-in, but when Outlook loads there is a noticeable delay (~5 seconds) before the UI becomes responsive.

I've attached and debugged, and I can see the following method is what's holding things up;

AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.OlApplicationEvents_BaseLogic.DoConnectToReminders(object app, object events) + 0x5f bytes
AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.OlApplicationEvents_11_SinkHelper.ConnectTo(object app, object events) + 0x54 bytes
AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.AddinExpress.MSO.IDTExtensibility2.OnStartupComplete(ref System.Array custom) + 0x14b7 bytes


I'm using Add-in Express 7.4.4067.

Does anyone have any idea what might be causing this?

Thanks,
Chris
Posted 17 Feb, 2014 10:17:10 Top
Andrei Smolin


Add-in Express team


Posts: 14356
Joined: 2006-05-11
Hello Chris,

I suppose the issue occurs only on that PC. Please confirm.

This can be caused by a corrupted reminder or calendar item. You can try creating a new profile or running scanpst.exe on the existing profile. Also, we've been reported that a similar issue occurred on a profile having some 30,000+ reminders; the issue was fixed by cleaning up the reminders.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Feb, 2014 03:04:13 Top
Chris McA




Posts: 58
Joined: 2014-01-21
Hi Andrei,

Unfortunately it seems to happening on more than one machine.

I tried your suggestion to clean up the profile, but the issue remains. The reminders thing is probably not applicable to my situation either, I think there's probably no more than 20 or 30 in total.

To investigate a bit further, I've disabled "Just my code" and the following exception occurs three times:

COMException occurred: Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))

Here are the stack traces of where it happens;

AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.GetFullFolderName(object folder, bool clearFolderInterface) + 0x391 bytes	
AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.Install() + 0xc47 bytes	
AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.AddinExpress.MSO.IDTExtensibility2.OnStartupComplete(ref System.Array custom) + 0xdf7 bytes


AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.GetFullFolderName(object folder, bool clearFolderInterface) + 0x391 bytes	
AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.OlExplorerEvents_BaseLogic.DoExplorerFolderSwitch() + 0x20d bytes	
AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.OlExplorerEvents_BaseLogic.DoExplorerActivate() + 0x71b bytes	
AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.OlExplorersEvents_SinkHelper.DoNewExplorer(object sender, object explorer) + 0x3e2 bytes	
AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.AddinExpress.MSO.IDTExtensibility2.OnStartupComplete(ref System.Array custom) + 0x1645 bytes	


AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.GetFullFolderName(object folder, bool clearFolderInterface) + 0x391 bytes	
AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.OlExplorerEvents_BaseLogic.DoExplorerFolderSwitch() + 0x20d bytes	
AddinExpress.MSO.2005.dll!AddinExpress.MSO.ADXAddinModule.OlExplorerEvents_10_SinkHelper.AddinExpress.MSO.IExplorerEvents_10.FolderSwitch() + 0x1d bytes	


I don't know if that's relevant or if it's just something that ADX handle internally, but I thought I'd post it anyway.

Is there anything else I can investigate to give you more info about this problem?

Thanks,
Chris
Posted 19 Feb, 2014 10:26:10 Top
Andrei Smolin


Add-in Express team


Posts: 14356
Joined: 2006-05-11
Hi Chris,

The exceptions doesn't seem to relate to the issue.

We need to reproduce this. Is the profile you are using an Exchange profile (cached or non-cached?), IMAP, PST?

Does the same occur if you create a new PST profile?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Feb, 2014 06:43:54 Top
Chris McA




Posts: 58
Joined: 2014-01-21
Andrei,

I created a new profile and you are correct, it seemed to load quickly now.

The profile that's having the problem is a cached Exchanged one (Office 365 if that makes any difference).

Are there any other things you think I could investigate to work out what is wrong with this profile?

Thanks,
Chris
Posted 20 Feb, 2014 09:50:50 Top
Andrei Smolin


Add-in Express team


Posts: 14356
Joined: 2006-05-11
Chris,

I'd check if the same issue is reproducible on a new Outlook profile targeting Office 365 Exchange. If there're machines on which the issue isn't reproducible, you can look for configuration differences and/or the difference in the number of reminders. Also, you can create a *shared* add-in that connects to the events of the Reminders collection at startup and provides time measurements; you can use System.Diagnostics.Debug.WriteLine() and gather this info at run time using the DebugView utility - http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx.

I cannot reproduce the issue on my Exchange Online account.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Feb, 2014 05:22:03 Top
Chris McA




Posts: 58
Joined: 2014-01-21
Hi Andrei,

So, I added some timing code to my add-in;

Debug.WriteLine(DateTime.Now.Second + "." + DateTime.Now.Millisecond);
var reminders = this.application.Reminders;
Debug.WriteLine(DateTime.Now.Second + "." + DateTime.Now.Millisecond);


Over 10 iterations, this produced an average delay of 2831 milliseconds. The outliers were 695ms and 4312ms.

I've tried deleting all reminders in my profile to see if that makes a difference, but the delay still occurs.

Is there any way to instruct ADX to not hook up to the reminders collection? I have no interest in looking at reminders, so I wouldn't be worried if ADX didn't subscribe to these events.
Posted 25 Feb, 2014 03:53:38 Top
Andrei Smolin


Add-in Express team


Posts: 14356
Joined: 2006-05-11
Hi Chris,

Chris McA writes:
Over 10 iterations, this produced an average delay of 2831 milliseconds. The outliers were 695ms and 4312ms.


In my tests, only the first call matters.

Chris McA writes:
Is there any way to instruct ADX to not hook up to the reminders collection?


No such way exists. It is easy to turn connecting these events off. But this relates to the product's functionality and we will need strong reasons to do this. Could you please create a shared add-in (to rule Add-in Express out) and check if connecting to these events causes the delay?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 25 Feb, 2014 10:27:56 Top
Chris McA




Posts: 58
Joined: 2014-01-21
Hi Andrei,

Apologies for the slow reply - I had to get Visual Studio 2010 installed to create the Shared Add-in.

So, I've profiled this again and I'm getting an average of 2 seconds to access the Reminders collection. Note that I'm not even hooking up to any events, I'm literally just accessing the collection;

public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
	this.applicationObject = application;
	this.addInInstance = addInInst;

	var outlookApp = (Application)application;
	Debug.WriteLine(DateTime.Now.Second + "." + DateTime.Now.Millisecond);
	Reminders reminders = outlookApp.Reminders;
	Debug.WriteLine(DateTime.Now.Second + "." + DateTime.Now.Millisecond);
}


So that confirms that ADX is not causing the delay. However, it's still problematic for me in that ADX accesses this collection even though I'm not interested in it.

Is there any way that you're aware of that I can search through my profile to determine what item is corrupted? I created a new profile that connects to the same mail account and it actually works without the delay - so I know I can probably just fix this by deleting my profile and re-connecting to Exchange with a new one.

I'm worried that, even though this is only happening on one machine so far, I have no way of knowing how many users this could affect - and the perception will be that my add-in is causing Outlook to start slowly. I appreciate that this is going beyond your remit to help me with this issue, but I thought I'd just check in case you had any further ideas.

Thanks again,
Chris
Posted 28 Feb, 2014 05:34:29 Top
Andrei Smolin


Add-in Express team


Posts: 14356
Joined: 2006-05-11
Thank you for posting these details.

Please check http://support.microsoft.com/kb/983036. Please let me know if deleting the .ost as described in that article helps.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Feb, 2014 07:49:05 Top