5

I am using VS2013 and the Microsoft WebAPI. WHen I start up my application it spends a lot of time doing things such as the following:

'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/1273337584/ROOT-1-130406535805395435): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/1273337584/ROOT-1-130406535805395435): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/1273337584/ROOT-1-130406535805395435): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/1273337584/ROOT-1-130406535805395435): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Utilities.v4.0\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Utilities.v4.0.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Utilities.v4.0\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Utilities.v4.0.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/1273337584/ROOT-1-130406535805395435): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Caching\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Caching.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaIISHost.exe' (CLR v4.0.30319: RdRuntime): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsAzureTelemetryEvents\v4.0_2.2.0.0__31bf3856ad364e35\WindowsAzureTelemetryEvents.dll'. Cannot find or open the PDB file.
'iisexpress.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Caching\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.Caching.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WaIISHost.exe' (CLR v4.0.30319: RdRuntime): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsAzureEventSource\v4.0_2.2.0.0__31bf3856ad364e35\WindowsAzureEventSource.dll'. Cannot find or open the PDB file.
'WaIISHost.exe' (CLR v4.0.30319: RdRuntime): Loaded 'C:\K\JavaCert - S263\JavaCert\csx\Debug\roles\WebRole1\approot\bin\WebRole1.dll'. Symbols loaded.
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/1273337584/ROOT-1-130406535805395435): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.JScript\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.JScript.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

Is there any possible way that I could speed this up? For example would it be faster if I was to have IIS running and use that?

Note this is slightly similar to

Exceedingly long compile time for Entity Framework project

However this question was not properly answerd so it's no help to me.

Community
  • 1
  • 1
  • See http://stackoverflow.com/questions/606023/is-there-any-way-to-speed-up-the-edit-compile-debug-cycle-in-asp-net – marknuzz Oct 28 '15 at 18:52

2 Answers2

1

IIS vs IIS Express probably won't help your application startup time. But reading this output leads me to believe you're running the entire application in debug mode. Debugging is VERY slow. I would start by running the application without a debugger attached, and ensure debug="true" is not set in the web.config.

Steven V
  • 16,357
  • 3
  • 63
  • 76
  • What if we actually want to debug the application? Since you can debug applications that are already running, by attaching debuggers after the fact, why does this have to make the STARTUP time take so long? – marknuzz Oct 28 '15 at 18:50
  • Also, this answer seems to contradict yours: http://stackoverflow.com/a/9510110/881111 – marknuzz Oct 28 '15 at 18:55
  • 1
    @Nuzzolilo Visual Studio Development Server and IIS/IIS Express are not the same thing and will potentially have different startup times. The VS Development Server that the answer references isn't shipped with more recent versions of Visual Studio. As for debugging, take a look at [this blog post by Scott Gu](https://weblogs.asp.net/scottgu/442448) about why debug mode can be slower. – Steven V Oct 28 '15 at 19:19
  • I was more referring to the fact that he was able to get a four second cycle time after switching to IIS, even with debugging (he mentioned attaching, which is specific to debugging). My thinking was that when debugging IIS express, VS launches the startup protocol with IIS express and there seems to be some additional overhead time involved. IIS standard on the other hand runs standalone and VS instead attaches to it after the fact. IIS doesn't have a debugger attached to it until it's already running. Could the issue be more related to the compilation mode (debug vs release)? – marknuzz Oct 28 '15 at 19:31
  • Whether a debugger is attached or not doesn't seem to affect the spin-up time. – marknuzz Oct 28 '15 at 19:31
  • 1
    @Nuzzolilo I don't think you're running into something with debugging. To be honest, 4 seconds for app startup is pretty quick for ASP.NET. You may want to try asking a new question to get fresh eyes on it. Maybe include what version of Windows and if you're doing anything on application startup (i.e. using WebActivator or third party libraries that could be hooking into application startup) – Steven V Oct 28 '15 at 19:59
  • 1
    Thanks, I found an article that looks like a great source of information that may help. http://blogs.msdn.com/b/mcsuksoldev/archive/2011/01/19/common-performance-issues-on-asp-net-web-sites.aspx – marknuzz Oct 28 '15 at 21:12
1

Just wondered the same and tried for an application I have. Switching from from IIS Express to Local IIS actually slowed it down by a couple seconds. I am also using debug configuration (on purpose).

BVernon
  • 3,205
  • 5
  • 28
  • 64