We have a couple of large solutions, each with about 40 individual projects (class libraries and nested websites). It takes about 2 minutes to do a full rebuild all.
A couple of specs on the system:
- Visual Studio 2005, C#
- Primary project is a Web Application Project
- 40 projects in total (4 Web projects)
- We use the internal VS webserver
- We extensively use user controls, right down to a user control which contains a textbox
- We have a couple of inline web projects that allows us to do partial deployment
- About 120 user controls
- About 200.000 lines of code (incl. HTML)
- We use Source Safe
What I would like to know is how to bring down the time it takes when hitting the site with a browser for the first time. And, I'm not talking about post full deployment - I'm talking about doing a small change in the code, build, refresh browser.
This first hit, takes about 1 minute 15 seconds before data gets back.
To speed things up, I have experimented a little with Ram disks, specifically changing the <compilation> attribute in web.config, setting the tempDirectory to my Ram disk. This does speed things up a bit. Interestingly though, this totally removed ALL IO access during first hit from the browser.
Remarks
We never do a full compile during development, only partial. For example, the class library being worked on is compiled and then the main site is compiled which then copies the binaries from the class library to the bin directory.
I understand that the asp.net engine needs to parse all the ascx/aspx files after critical files have been changed (bin dir for example) but, what I don't understand is why it needs to do that when only one library dll has been modified.
So, anybody know of a way to either: Sub segment the solutions to provide faster first hit or fine tune settings in config files or something.
And, again: I'm only talking about development, NOT production deployment, so doing the pre-built compile option is not applicable.
Thanks, Ruvan