Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > ClickOnce start time from Start Menu link
 

ClickOnce start time from Start Menu link

I have big application (190 MB in 600 files) deployed using clickonce 3.5. After installation of this application i run it from link located in Start Menu but it takes over 4-12 sec to show my Splash Screen. When this application is run from .exe file Splash screen is visible after 1 sec.
My application don't use automatic updates (Clickonce update is done manually from source code)

I've try to profile this application using dotTrace to find out what takes so long during startup and find out that
IActContext System.Deployment.Internal.Isolation.IsolationInterop.CreateActContext(IDefinitionAppId)
takes a lot of time

Here is entire subtree:
36,71% SetDomainManager - 12972 ms - 0 calls - System.AppDomain.SetDomainManager(Evidence, Evidence, IntPtr, Boolean)
  18,52% CreateActivationContext - 6542 ms - 0 calls - System.Deployment.Internal.Isolation.Manifest.CmsUtils.CreateActivationContext(String, String [], Boolean, ApplicationIdentity &, ActivationContext &)
    18,52% ActivationContext..ctor - 6542 ms - 0 calls - System.ActivationContext..ctor(ApplicationIdentity)
      18,52% CreateFromName - 6542 ms - 0 calls - System.ActivationContext.CreateFromName(ApplicationIdentity)
        18,52% CreateActContext - 6542 ms - 0 calls - System.Deployment.Internal.Isolation.IsolationInterop.CreateActContext(IDefinitionAppId)
  18,19% SetupApplicationHelper - 6429 ms - 0 calls - System.AppDomain.SetupApplicationHelper(Evidence, Evidence, ApplicationIdentity, ActivationContext, String [])
    18,19% DetermineApplicationTrust - 6429 ms - 0 calls - System.Security.HostSecurityManager.DetermineApplicationTrust(Evidence, Evidence, TrustManagerContext)
      18,10% get_ActivationContext - 6396 ms - 0 calls - System.Runtime.Hosting.ActivationArguments.get_ActivationContext()
        18,10% CreateFromName - 6396 ms - 0 calls - System.ActivationContext.CreateFromName(ApplicationIdentity)
          18,10% CreateActContext - 6396 ms - 0 calls - System.Deployment.Internal.Isolation.IsolationInterop.CreateActContext(IDefinitionAppId)
      0,09% DetermineApplicationTrustInternal - 33 ms - 0 calls - System.Security.Policy.ApplicationSecurityManager.DetermineApplicationTrustInternal(ActivationContext, TrustManagerContext)
How can i reduce this start time of my application? This is very critical because sometimes user has to wait over 12 secs to see Splash Screen

Thanks in advance
Irek Makowski  Thursday, April 09, 2009 3:28 PM

Does your app do anything before showing the splash screen? Also, I'm assuming you have unchecked the box in "check for updates" in the Updates dialog?

RobinS.
GoldMail.com
Check out my blog at http://robindotnet.wordpress.com
RobinDotNet  Monday, April 13, 2009 4:36 AM

Hi Irek,

Please try to profile the application using dotTrace when you runthe applicationdirectly from the disk. Compare the time it takes the application to execute the line of code "IActContext System.Deployment.Internal.Isolation.IsolationInterop.CreateActContext(IDefinitionAppId)" when it is run directly and when it is launched from Start menu.

Thanks,
Linda Liu

Linda Liu  Tuesday, April 14, 2009 10:11 AM
This application does nothing before showing the splash screen. Check for updates is unchecked because we use manual updates.
Irek Makowski  Monday, June 29, 2009 1:43 PM
I've done it. Here are results:
Application run from the clickonce link

100,00% SetDefaultDomainManager - 4852,9 ms - 1 call - System.AppDomain.SetDefaultDomainManager(String, String [], String [])
99,96% SetDomainManager - 4850,9 ms - 1 call - System.AppDomain.SetDomainManager(Evidence, Evidence, IntPtr, Boolean)
50,04% SetupApplicationHelper - 2428,3 ms - 1 call - System.AppDomain.SetupApplicationHelper(Evidence, Evidence, ApplicationIdentity, ActivationContext, String [])
47,78% CreateActivationContext - 2318,6 ms - 1 call - System.Deployment.Internal.Isolation.Manifest.CmsUtils.CreateActivationContext(String, String [], Boolean, ApplicationIdentity &, ActivationContext &)
1,05% MergeApplicationEvidence - 51,0 ms - 1 call - System.Deployment.Internal.Isolation.Manifest.CmsUtils.MergeApplicationEvidence(Evidence, ApplicationIdentity, ActivationContext, String [], ApplicationTrust)
0,00% get_ActivationArguments - 0,0 ms - 5 calls - System.AppDomainSetup.get_ActivationArguments()
0,00% get_ApplicationTrust - 0,0 ms - 1 call - System.AppDomainSetup.get_ApplicationTrust()
0,00% get_UseFusionActivationContext - 0,0 ms - 1 call - System.Runtime.Hosting.ActivationArguments.get_UseFusionActivationContext()
0,00% get_ApplicationFullName - 0,0 ms - 1 call - System.Runtime.Hosting.ActivationArguments.get_ApplicationFullName()
0,00% get_ActivationData - 0,0 ms - 1 call - System.Runtime.Hosting.ActivationArguments.get_ActivationData()
0,00% get_FusionStore - 0,0 ms - 1 call - System.AppDomain.get_FusionStore()
0,00% get_ApplicationManifestPaths - 0,0 ms - 1 call - System.Runtime.Hosting.ActivationArguments.get_ApplicationManifestPaths()
0,00% set_ActivationArguments - 0,0 ms - 1 call - System.AppDomainSetup.set_ActivationArguments(ActivationArguments)
0,00% ActivationArguments..ctor - 0,0 ms - 1 call - System.Runtime.Hosting.ActivationArguments..ctor(String, String [], String [])
0,00% get_FusionStore - 0,0 ms - 1 call - System.AppDomain.get_FusionStore()


Application run from exe file:

100,00% SetDefaultDomainManager - 3,1972 ms - 1 call - System.AppDomain.SetDefaultDomainManager(String, String [], String [])
57,10% SetDomainManager - 1,8255 ms - 1 call - System.AppDomain.SetDomainManager(Evidence, Evidence, IntPtr, Boolean)
11,08% PermissionSet..cctor - 0,3542 ms - 1 call - System.Security.PermissionSet..cctor()
0,01% PermissionSet..ctor - 0,0002 ms - 1 call - System.Security.PermissionSet..ctor(Boolean)
0,00% get_ApplicationTrust - 0,0000 ms - 1 call - System.AppDomainSetup.get_ApplicationTrust()
0,00% get_ActivationArguments - 0,0000 ms - 1 call - System.AppDomainSetup.get_ActivationArguments()
0,00% get_FusionStore - 0,0000 ms - 1 call - System.AppDomain.get_FusionStore()


As you can see there is no call for following methods:
SetupApplicationHelper
CreateActivationContext
Irek Makowski  Monday, June 29, 2009 2:20 PM

You can use google to search for other answers

Custom Search

More Threads

• stdole.dll
• InfoPath Form MSI fails to Install
• deploying with wrong shortcut name
• Automatical uninstallation of my already installed program Options
• uninstall doesn't work under XP
• How to create ShortCut On Desktop
• Who should use ClickOnce?
• How to create setup of WM 5.0 DeviceApplication ?
• "New Programs Installed" notification on ClickOnce Update
• Handle multiple click-once deployments & automation