2

Visual Studio 2008/2010/ASP.NET:

How to speed up the delay after rebuilding the solution?

I like to detach my debugger while testing my changes or debugging issues that can be pinpointed by a simple strack trace.

After I fix a bug, I build the solution and then refresh the page.

There's that initial lag time that occurs after the rebuild before the web page displays.

After that, it's as fast as it should be. I heard that the application is loading up all the new DLLs during this time.

Is there any way to reduce the amount of this lag?

1 Answer 1

7

You can set the optimizeCompilations to true, and batch to false

<compilation batch="false" optimizeCompilations="true" ... >

batch=false says to asp.net to build if necessary only the page that you call. We set batch to true, only on release live site to so the asp.net compiles many pages at ones, and you may have a big delay but only ones...

The optimizeCompilations=true says that each page is not check for libraries updates each time its runs. This have a minor issue - if you change a global static function for example that is called from 4 pages, this 4 pages did not know that this function change, so you need to just open them and saved them, to force compiler to re-compile them. Or else they throw error because they did not check if something change - you must know that and updates them to force the re-compile.

reference : CompilationSection Class

Sign up to request clarification or add additional context in comments.

3 Comments

I think this worked! I am going to do some minor benchmarking on the time and come back to mark as answer if it has sped up.
@oscilatingcretin it will speed up, but use them only on developer machine, not on realase. On release live iis have a lot of issue, and fail to find updates.
It's working perfectly. Fast load after rebuild. I will add a config transform to my other configs to remove these attributes on a publish. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.