Speed ​​up assembly load time during development

I am working on a large asp.net application (100s of assembly), and during development it may take several minutes to load the first page after recompilation.

I was told that most of the delay comes from JITing assemblies and that this delay is proportional to the number (but not size) of assemblies. I have not measured it yet.

We are working on architectural changes to improve the situation (combine assemblies, split applications), but I was wondering if there are any quick fixes that I can get, for example, changing IIS settings during development or combining DLL files after installation, build .

We are using .net 3.5.

Any suggestions for me?

+4
source share
4 answers

timid

Here is a solution I had to try earlier: Disabling virus protection reduces the initial boot time from a minute to less than 8 seconds.

+2
source

Take a look at pre-compiling applications to remove JIT.

ngen

Pre-copy assemblies that you don’t work on, create custom assembly configurations that don’t build assemblies that you don’t work on, and then only the ones you need will be JIT.

+3
source

I worked on a project similar to yours, with many builds. One of my strategies was to download only the builds that I needed for the development I was working on.

Another possibility is to combine all your builds with the post build action. Microsoft has this great tool called ILMerge . It combines several assemblies into one. You can write a build script message to combine these assemblies together.

You can also do this further by combining assemblies that you do not change, and add them as links.

Best of luck!

+2
source

You can look at NGENs for your builds, but if you are trying to speed up development time after builds, NGEN will not really help you. The time spent on the JIT code will always be with NGEN, since you will have to create your own instructions for everything you need to check. Anyway, NGEN'ing of your code will be slower in front.

0
source

All Articles