Welcome to my blog mainly about SharePoint

My fellow co-workers and I have been dealing with an extremely slow build > render process when we are developing SharePoint solutions that are deployed to the BIN folder for over a year now.

We are all using are own Windows Server 2003 image hosted on a VMware ESX Server farm with tons of other VM’s.

We all know that SharePoint can take anywhere from 30 seconds to 2 minutes to fire up the very first time you hit it and we accept that fact. However, we found ourselves waiting for up to 1 minute after making some code changes and perform a build that deployed the DLL to the BIN folder for SharePoint to render.

This can become extremely frustrating and frankly a waste of our time. I had gotten to a point where I just accepted the fact we had to deal with the slowness because no amount of tweaking we did on the VM (adding memory, CPU, etc) seemed to make a difference.

One of my co-workers did not want to accept the fact continued to investigate/troubleshoot the issue. He happened to come across the Understanding ASP.NET Dynamic Compilation (http://msdn.microsoft.com/en-us/library/ms366723.aspx) article, more specifically the section called Optimizing Dynamic Compilation. This section mentions an attribute you can add to your web.config file called optimizeCompilations which requires you to install a hot fix (KB961884). This attribute is going to be part of the .NET Framework 4.0 when it ships.

We were all amazed at the difference this attribute made to our development process. In one instance, it cut the time from 1 minute 10 seconds to 12 seconds (80% improvement!!).

The following screenshot shows the change in time with the attribute set to false and then set to true (fairly vanilla SharePoint application). The WebTimer utility just makes a simple web request to my SharePoint site.

Here is the order events described above:

optimzedCompilations attribute in web.config was set to “false”

Performed IISRESET to baseline

Executed WebTimer (40 seconds)

Modified some code in my solution and performed a build (which went into the BIN folder)

Executed WebTimer (30 seconds)

Switched optimizedCompilations to “true”

Performed IISRESET to baseline

Executed WebTimer (40 seconds)

Modified some code in my solution and performed a build

Executed WebTimer (12 seconds)

Needless to say, we have happy developers again!

You may or may not see much advantage to this if you are developing on a physical machine or on a workstation edition of a virtual client (VPC, VMware Workstation, or Virtual Box). But if you are running in an environment where the resources are being shared or you feel your build to render process seems slower than it should be, I highly recommend you try this hot fix / attribute out.

About

My name is Paul Liebrand and I currently reside in Southern California. I plan on writing about anything related Microsoft SharePoint.

Because of other interests I have , you may also see posts off topic here.

I also started a community wiki site that will be dedicated to Windows SharePoint Services and related technologies. I update it has frequently as I can, but I encourage others to check it out and contribute where possible. The site can be found at http://www.wsswiki.com.