The basics for these tips are that you are willing to use some of your computer memory to speed things up.
The concept is to use a RAM disk for temporary files storage to speed up the development environment. I am currently using 512 memory on my 8gb Windows 8 pc for the RAM disk.
The tips originates from:
Step 1. Install Ram disk (free software):
Run ImDisk Ram Disk Configuration.
Set drive to q: and 512mb RAM disk on my 8 gb memory pc, enable “Launch at Windows Startup”.
Above: here the drive size is set to 512mb. Its changeable, its a “temp” drive. Its non persistant everything gets wiped upon system restart.
Step 2. Set asp net temp folders pointed to RAM disk:
“To speed up the first load time, you can tell IIS to store its temporary files on your RAM disk (or fastest disk) by changing the following setting in your web.config files:
You can either change your project files directly, or, if you’ve lazy and have numerous applications running on your development machine (like I do), update the system-wide web.config files. Note that you need to update this for each runtime version of the Framework and, if running a 64-bit machine, for both Framework and Framework64. On my machine, I needed to modify the following files:
Step 3. Chrome cache pointed to RAM disk:
If you use Chrome as development browser this tip helps you point out the custom cache folder and set a size.
Shortcut target value (pointed to q: drive and 100mb cache) :
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disk-cache-dir="q:\temp\chromecache" --disk-cache-size=104857600
Change HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command in Windows registry to
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disk-cache-dir="q:\temp\chromecache" --disk-cache-size=104857600 -- "%1"
It feels like my computer is “snappier” and faster when surfing in Chrome. But I am not really sure if the time to render first page after build is any faster? It still takes about 1 minute after rebuild of entire solution.
Tell antivirus (for me its just windows defender) to exclude q: folder from scanning. You could also add your base projects folder and Visual Studio folders;
C:\Program Files (x86)\Microsoft Visual Studio 11.0
C:\Program Files (x86)\Microsoft Visual Studio 12.0
Create a bat file for starting Visual Studio to enforce Visual Studio temp files to q:
Bat and shortcut file for download:
Visual Studio 2013.zip
Set ReSharper temp files to use system temp as well:
Not sure if this speeds things up: (just another temp folder used by IIS):
Put this directive in the top of your aspx file:
<%@ MasterType VirtualPath=”~/Templates/MasterPages/Default.Master” %>
The aspx-file gets reference to the masterpages properties in code-behind trough Master.PropertyName e.g:
Works in Web Forms ASP.NET 4.0 as well.
This seems like a nice “does it all” nuget package:
Bundling and minifications, gzip, cache headers
- All in one solution supporting JS/CSS combination, minification, compression and caching (by adding proper Expires/Cache-Control headers, ETag and server-side caching)
- Easy to use, simply download it via Nuget, declare JS and CSS resource groups in an XML file and use them in your pages, Combres will take care of the rest
- Integrated with ASP.NET routing engine and work with ASP.NET WebForm 3.5/4.0/4.5, ASP.NET MVC 2/3/4 and Azure web applications
- Detect changes in Combres config file, managed JS/CSS files and support auto-versioning, so you don’t have to manually rebundle JS/CSS resources after making changes to them
- Extensible architecture with many extension points
- And many more: CDN, HTTPS, debug mode, external JS/CSS (dynamically requested from other servers), Less CSS etc.
- Proven solution with many thousands of downloads in NuGet, CodePlex and The Code Project
The ASP.NET Framework has been around for over ten years, and the platform has enabled the development of countless Web sites and services. As Web application development strategies have evolved, the framework has been able to evolve in step with technologies like ASP.NET MVC and ASP.NET Web API. As Web application development takes its next evolutionary step into the world of cloud computing, project Katana provides the underlying set of components to ASP.NET applications, enabling them to be flexible, portable, lightweight, and provide better performance – put another way, project Katana cloud optimizes your ASP.NET applications.