Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 1000
Irek Avatar asked Nov 14 '22 15:11

Irek


1 Answers

It looks like a good portion of the time is spent determining the trust level of your application. Have you tried deploying this application with full trust to see if that will shave down the time?

like image 170
JaredPar Avatar answered Dec 18 '22 21:12

JaredPar