{"id":4,"date":"2015-01-27T06:58:38","date_gmt":"2015-01-27T06:58:38","guid":{"rendered":"http:\/\/netdev.co.za\/blog\/?p=4"},"modified":"2020-07-16T17:32:39","modified_gmt":"2020-07-16T15:32:39","slug":"the-case-for-better-io-in-resharper","status":"publish","type":"post","link":"https:\/\/netdev.co.za\/blog\/the-case-for-better-io-in-resharper\/","title":{"rendered":"The case for better I\/O in ReSharper"},"content":{"rendered":"<p>So, this all began when I received a brand new Dell Latitude E6540 laptop for\u00a0work, armed with 16Gb of RAM and a 500Gb spinning rust HDD.<br \/>\nOh, and all the drive contents are encrypted via McAfee, thanks to corporate security policies.<\/p>\n<p>After some use, (and one HDD failure), I noticed that the HDD was constantly getting trashed, especially when it came to managing temporary files used by applications like Visual Studio 2012\/3 and ReSharper.<\/p>\n<p>I also noticed that out of the 16Gb of RAM installed on the laptop, the maximum usage never went over 6\/8Gb, leaving a lot of free RAM just hanging around, doing nothing.<\/p>\n<p>Then an idea hit me with the force of a 90&#8217;s acid flashback.<\/p>\n<p>Remember back in the old DOS days, when you could configure RAM drives (virtual hard drives which allocated their space in RAM)?<br \/>\nWell, it turns out you can still do that today in Windows!<\/p>\n<p>I found a great utility called <a href=\"http:\/\/reboot.pro\/files\/file\/284-imdisk-toolkit\/\" target=\"_blank\" rel=\"noopener noreferrer\">ImDisk Toolkit<\/a> which enables you to create RAM drives with ease.<\/p>\n<p>Once installed, run the RamDisk Configuration shortcut and you should be presented with the following screens (Basic and Advanced):<\/p>\n<p><a href=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-6 size-full aligncenter\" src=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config.png\" alt=\"ramdisk_config\" width=\"386\" height=\"489\" srcset=\"https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config.png 386w, https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config-237x300.png 237w\" sizes=\"(max-width: 386px) 100vw, 386px\" \/><\/a><a href=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config_advanced.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-8 size-full aligncenter\" src=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config_advanced.png\" alt=\"ramdisk_config_advanced\" width=\"386\" height=\"489\" srcset=\"https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config_advanced.png 386w, https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config_advanced-237x300.png 237w\" sizes=\"(max-width: 386px) 100vw, 386px\" \/><\/a><\/p>\n<p>I chose to allocate 1Gb of RAM for the drive size, left the drive letter assignment as R:, as well as left the file system type to NTFS.<\/p>\n<p>Enable the options for Launch at Windows Startup, and Create TEMP Folder.<\/p>\n<p>Click on the Set TEMP Variables&#8230; button and you&#8217;ll be presented with the following screens:<\/p>\n<p><a href=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/temp_variables_before.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-9 size-full aligncenter\" src=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/temp_variables_before.png\" alt=\"temp_variables_before\" width=\"478\" height=\"345\" srcset=\"https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/temp_variables_before.png 478w, https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/temp_variables_before-300x217.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/a><\/p>\n<p>Click the Set All To: button to point all your temporary file paths to the newly created RAM drive (in this case, R:\\Temp)<\/p>\n<p><a href=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/temp_variables_after.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-10 size-full aligncenter\" src=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/temp_variables_after.png\" alt=\"temp_variables_after\" width=\"478\" height=\"345\" srcset=\"https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/temp_variables_after.png 478w, https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/temp_variables_after-300x217.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/a><\/p>\n<p>Click OK to save the settings, and then lets move onto the Advanced tab.<\/p>\n<p><a href=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config_advanced.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-8 size-full aligncenter\" src=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config_advanced.png\" alt=\"ramdisk_config_advanced\" width=\"386\" height=\"489\" srcset=\"https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config_advanced.png 386w, https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_config_advanced-237x300.png 237w\" sizes=\"(max-width: 386px) 100vw, 386px\" \/><\/a><\/p>\n<p>On this screen, make sure you&#8217;ve checked\u00a0the Use AWE physical memory, as this guarantees that the memory is never written to the Windows page-file (which would kind of make this entire exercise pointless).<\/p>\n<p>Click OK, and viola! You have a brand new 1Gb RAM drive which will handle all your temporary file management. A restart will be required for all the settings to take hold.<\/p>\n<p>Once restarted, we need to configure ReSharper to point to the new RAM drive for its temporary file handling (this normally happens when you&#8217;ve enabled Solution Wide Analysis, etc.)<\/p>\n<p>Open up Visual Studio, choose the ReSharper menu item and then select Options&#8230;<\/p>\n<p><a href=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/resharper_settings.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-11 size-full aligncenter\" src=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/resharper_settings.png\" alt=\"resharper_settings\" width=\"1024\" height=\"768\" srcset=\"https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/resharper_settings.png 1024w, https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/resharper_settings-300x225.png 300w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Choose the System TEMP folder option and Save your settings, thereafter, restart\u00a0Visual Studio and\u00a0ReSharper should start dumping all of its temporary files into the RAM drive location.<\/p>\n<p>Now, enable solution wide analysis on any of your existing .NET projects and see if you can notice a marked improvement in analysis speed. Your mileage may vary, especially if your existing conditions are not like mine (non-SSD, encrypted drive by McAfee, etc.)<\/p>\n<p>Here are some benchmarks on how the standard HDD performs:<\/p>\n<figure id=\"attachment_20\" aria-describedby=\"caption-attachment-20\" style=\"width: 416px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/hdd_speed.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-20 size-full\" src=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/hdd_speed.png\" alt=\"hdd_speed\" width=\"416\" height=\"375\" srcset=\"https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/hdd_speed.png 416w, https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/hdd_speed-300x270.png 300w\" sizes=\"(max-width: 416px) 100vw, 416px\" \/><\/a><figcaption id=\"caption-attachment-20\" class=\"wp-caption-text\">ST500LM000-1EJ162<\/figcaption><\/figure>\n<p>These are the results using an SSD drive:<\/p>\n<figure id=\"attachment_24\" aria-describedby=\"caption-attachment-24\" style=\"width: 414px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ssd_performance.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-24 size-full\" src=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ssd_performance.png\" alt=\"ssd_performance\" width=\"414\" height=\"372\" srcset=\"https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ssd_performance.png 414w, https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ssd_performance-300x270.png 300w\" sizes=\"(max-width: 414px) 100vw, 414px\" \/><\/a><figcaption id=\"caption-attachment-24\" class=\"wp-caption-text\">OCZ-VERTEX4<\/figcaption><\/figure>\n<p>And here are some benchmarks on how the RAM drive performs:<\/p>\n<figure id=\"attachment_21\" aria-describedby=\"caption-attachment-21\" style=\"width: 416px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_speed.png\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-21 size-full\" src=\"http:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_speed.png\" alt=\"ramdisk_speed\" width=\"416\" height=\"375\" srcset=\"https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_speed.png 416w, https:\/\/netdev.co.za\/blog\/wp-content\/uploads\/2015\/01\/ramdisk_speed-300x270.png 300w\" sizes=\"(max-width: 416px) 100vw, 416px\" \/><\/a><figcaption id=\"caption-attachment-21\" class=\"wp-caption-text\">RAM Disk<\/figcaption><\/figure>\n<p>I&#8217;d love to\u00a0hear your feedback on whether this has helped improve the speeds of your development workflow in any way.<\/p>\n<p>G.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, this all began when I received a brand new Dell Latitude E6540 laptop for\u00a0work, armed with 16Gb of RAM and a 500Gb spinning rust HDD. Oh, and all the drive contents are encrypted via McAfee, thanks to corporate security policies. After some use, (and one HDD failure), I noticed that the HDD was constantly &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[4,3,5],"_links":{"self":[{"href":"https:\/\/netdev.co.za\/blog\/wp-json\/wp\/v2\/posts\/4"}],"collection":[{"href":"https:\/\/netdev.co.za\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netdev.co.za\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netdev.co.za\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netdev.co.za\/blog\/wp-json\/wp\/v2\/comments?post=4"}],"version-history":[{"count":12,"href":"https:\/\/netdev.co.za\/blog\/wp-json\/wp\/v2\/posts\/4\/revisions"}],"predecessor-version":[{"id":197,"href":"https:\/\/netdev.co.za\/blog\/wp-json\/wp\/v2\/posts\/4\/revisions\/197"}],"wp:attachment":[{"href":"https:\/\/netdev.co.za\/blog\/wp-json\/wp\/v2\/media?parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netdev.co.za\/blog\/wp-json\/wp\/v2\/categories?post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netdev.co.za\/blog\/wp-json\/wp\/v2\/tags?post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}