Technical

Speed up your local Sitefinity development

I received a few emails about how to configure the little tool I use to speed up my Sitefinity development. Since it is really simple to configure, I thought that it might be a good idea to post it here.

Daniel Plomp

October 20th, 2021

Request
I recently received a few emails about how to configure the little tool I used to speed up my Sitefinity development. Since it is really simple to configure, I thought that it might be a good idea to post it here.

Problem
When developing for Sitefinity on your local machine, it becomes very frustrating when you have to wait too long for Sitefinity to restart and show the changes you’ve made to the project.

Every time you do a build or make changes that require a restart of the application, IIS is compiling and pre-fetching the application. After creating the cache it finally serves the files to the browser. Add to that the Sitefinity Initializing process and it all takes a lot of time and resources.

(A) solution
A possible solution could be to move the temporary files that are generated by IIS to a RAM disk. This way the temporary files are written to memory and not to the disk, which leads to an overall performance boost while doing development for Sitefinity.

  1. Download RAMDisk.
    So to make use of this we need to download a little program called ‘RAMDisk’.
    You can download RAMDisk from this site.

  2. Configure RAMDisk
    Configure RAMDisk to create a new drive (in memory)
    In general: a Sitefinity project renders about +/- 500MB on files to your disk, so you have to try and see what size your RAMDisk should be. I usually reserve about 1GB of memory, since I use it on multiple projects.

  3. Configure Sitefinity to use this new drive
    You can configure your Sitefinity app to write the temporary files to this new drive from the web.config. Since Sitefinity is just an ASP.NET Web Application, it means that you can also apply this to a normal ASP.NET application. Edit the web.config and make sure that the tempDirectory attribute of the compilation node is set this way:

Restart your application and you’ll see the temporary files appear inside the location you configured.

Of course, you should make use of the web.config transformations to make sure you don’t publish this to your live website.

All rights reserved © ZimplerApps 2021