Question

I've noticed as my website gets bigger and bigger, the time my laptop takes to display my page is much longer then say a new projects with minimal references.

I think there are two variables at play that affect ASP.NET warm-up time:

  • The quantity of external references
  • The time it takes for a worker process to new() up each instance per worker process
  • Additional time for the WCF objects as the ServiceHost may be in an external DLL

First, are those the correct variables to take into account when considering ASP.NET startup time?

Next, it appears that web.config may dispatch other objects for use with certain filetypes (*.svc, *.aspx, Windows Identity Foundation (WIF), etc. ). This too may cause delays in ASP.NET.

Last, my project is created as a "web project" not a "web site". Not sure if this has an impact.

Is my theory full of holes, or is there something I can do to make development on a old laptop any better?

Was it helpful?

Solution

The worker process will load any references into the AppDomain as they are needed. This means when the application first starts up not all of your referenced assemblies may be loaded. If you are finding a lot of your bootstrapping time (the initial application start up time) is increasing, I would consider looking at exactly what you are doing in your Application_Start method, etc. The other thing to remember, is that this initial startup time is essentially a one off, it will only occur for each application startup (don't forget when your application pool gets recycled too). Because it is a one time thing, does the start up time matter? Once the site has had its initial page view, execution from that point onwards should be quite speedy.

You could run something like ANTS Profiler, or dotTrace and profile exactly where all the time is being spent, and then decide what performance improvements you wish to make based on that information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top