30 sec. start up delay with ADX

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

30 sec. start up delay with ADX
delay is between -new app domain- and -unwrapping- in the log 
daFab




Posts: 49
Joined: 2009-03-05
We have a delay of about 30 seconds when starting any ADX Add-in. (Word, Outlook etc.)
Please find the log below. The interesting lines are marked with >.
Any ideas what is wrong or how we can investigate the issue?
Thanks
Fabian



08:05:11 1600 The 'shadow copy' is enabled.
08:05:11 1600 Creating a new application domain.
>08:05:11 1600 Success.
>08:05:42 1600 Unwrapping the managed class.
08:05:42 1600 Success.
08:05:42 1600 Querying the add-in extensibility.
08:05:42 1600 Querying the custom task panes.
08:05:42 1600 Querying the ribbon extensibility.
08:05:42 1600 Success.
08:05:42 1600 Querying the form regions.
08:05:42 1600 Success.
08:05:42 1600 The managed add-in class has been created successfully.
Greetings

Fabian
Posted 05 Mar, 2009 06:13:59 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Posted 05 Mar, 2009 07:48:34 Top
daFab




Posts: 49
Joined: 2009-03-05
Hi Sergey,

thank you, I read all of the thread but could not solve the issue:
- Certificate Revocation is turned off

I understand that Add-in Express is just calling CreateInstance and that this is causing the issue.
However all our current and future add-ins are not usable if we can not resolve the issue..

can you please give us some hints how to solve/understand it:
something like: unmanaged rather then managed add-ins??
global .net settings??
any vague idea is welcome

kind regards
Fabian
Greetings

Fabian
Posted 05 Mar, 2009 09:19:36 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Fabian, please try to clear the dll cache. Sometimes it helps.
Posted 05 Mar, 2009 11:53:36 Top
daFab




Posts: 49
Joined: 2009-03-05
Sergey, thanks, but it did not solve the issue.

it is a reproducable problem so there should be a way to get more info on why there is such a huge delay (when the CPU is idle!)? I am very thankful for any advice what is going wrong here.

we plan to roll out an add-in to a large user group, but we can not with this delay.

kind regards
Fabian

Greetings

Fabian
Posted 05 Mar, 2009 13:42:11 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Fabian, I can't reproduce it. Do you use Add-in Express custom forms?
Do you get the same delay with a simple add-in?
Posted 05 Mar, 2009 14:14:43 Top
daFab




Posts: 49
Joined: 2009-03-05
Sergey,
I know that it does not happen on all machines. but on certain machines it happens always.
We will try to narrow down the setup where the issue occurs.
Maybe it has something to do with user domain accounts rather then local windows machines -as mentioned in the thread that you showed me. or something with digital certificates.

the issue happens also with a simple pseudo add-in (word, one button, no forms)

do you know what exactly happens in the add-in express code at

IfFailReturn(CreateLocalAppDomain());
IfFailReturn(m_pLocalDomain->CreateInstance(CComBSTR(szAssemblyName), CComBSTR(szClassName), &pObjHandle));
p_Proxy->InitManagedDisp();
WriteToLog("Unwrapping the managed class.", "");

? then we could try to investigate from there.

Greetings

Fabian
Posted 06 Mar, 2009 04:25:21 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Fabian.

IfFailReturn(CreateLocalAppDomain());

HRESULT CLoader::CreateLocalAppDomain()
{
HRESULT hr = S_OK;

if (m_pLocalDomain != NULL)
{
return hr;
}

CComBSTR configPath;
CComPtr<IUnknown> pDomainSetupPunk;
CComPtr<IAppDomainSetup> pDomainSetup;
CComPtr<IUnknown> pLocalDomainPunk;
TCHAR szDirectory[MAX_PATH + 1] = {0};

WriteToLog(L"Creating a new domain setup.", L"");

IfFailReturn(m_pHost->CreateDomainSetup(&pDomainSetupPunk));
IfFailReturn(pDomainSetupPunk->QueryInterface(__uuidof(pDomainSetup), (LPVOID*)&pDomainSetup));

WriteToLog(L"Success.", L"");
WriteToLog(L"Getting the add-in directory.", L"");

IfFailReturn(::GetDllDirectory(szDirectory, sizeof(szDirectory)/sizeof(szDirectory[0])));

WriteToLog(L"Success. The directory is '%s'", szDirectory);

pDomainSetup->put_ApplicationBase(CComBSTR(szDirectory));
if (configName.Length() != 0)
{
configPath.Append(szDirectory);
configPath.Append(L"\\");
configPath.Append(configName);
pDomainSetup->put_ConfigurationFile(configPath);
}

pDomainSetup->get_ConfigurationFile(&configPath);
WriteToLog(L"The configuration file is '%s'", configPath);

if (bShadowCopyEnabled)
{
WriteToLog(L"The 'shadow copy' is enabled.", L"");

pDomainSetup->put_ShadowCopyDirectories(CComBSTR(szDirectory));
pDomainSetup->put_ShadowCopyFiles(CComBSTR("true"));
}
else
{
WriteToLog(L"The 'shadow copy' is disabled.", L"");
}

WriteToLog(L"Creating a new application domain.", L"");

IfFailReturn(m_pHost->CreateDomainEx(CT2W(szDirectory), pDomainSetupPunk, 0, &pLocalDomainPunk));
IfFailReturn(pLocalDomainPunk->QueryInterface(__uuidof(m_pLocalDomain), (LPVOID*)&m_pLocalDomain));

WriteToLog(L"Success.", L"");

return hr;
}

IfFailReturn(m_pLocalDomain->CreateInstance(CComBSTR(szAssemblyName), CComBSTR(szClassName), &pObjHandle));

http://msdn.microsoft.com/en-us/library/7awchy3d.aspx
Posted 06 Mar, 2009 08:21:30 Top