October 20th, 2021
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.
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 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.
So to make use of this we need to download a little program called ‘RAMDisk’.
You can download RAMDisk from this site.
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.
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.