title: RAM drive for compiling - is there such a thing?
body: <p><s><a href="https://stackoverflow.com/questions/354160/what-do-you-do-while-your-codes-compiling#354176">An answer</a></s> <strong>(see below)</strong> to one of the questions right here on Stack&nbsp;Overflow gave me an idea for a great little piece of software that could be invaluable to coders everywhere.</p>
  
  <p>I'm imagining RAM drive software, but with one crucial difference - it would mirror a real folder on my hard drive. More specifically - the folder which contains the project I'm currently working on. This way any builds would be nearly instantaneous (or at least a couple orders of magnitude faster). The RAM drive would synchronize its contents with the hard disk drive in background using only idle resources.</p>
  
  <p>A quick Google search revealed nothing, but perhaps I just don't know how to Google. Perhaps someone knows of such a software? Preferably free, but reasonable fees might be OK too.</p>
  
  <p><b>Added:</b> Some solutions have been suggested which I discarded in the very beginning. They would be (in no particular order):</p>
  
  <ul>
  <li><b>Buy a faster hard disk drive (<a href="http://en.wikipedia.org/wiki/Solid-state_drive" rel="noreferrer">SSD</a> maybe or 10K RPM).</b> I don't want a hardware solution. Not only software has the potential to be cheaper (freeware, anyone?), but it can also be used in environments where hardware modifications would be unwelcome if not impossible - say, at the office.</li>
  <li><b>Let OS/HDD do the caching - it knows better how to use your free RAM.</b> The OS/HDD have generic cache algorithms that cache everything and try to predict which data will be most needed in the future. They have no idea that for me the priority is my project folder. And as we all know quite well - they don't really cache it much anyway. ;)</li>
  <li><b>There are plenty of RAM drives around; use one of those.</b> Sorry, that would be reckless. I need my data to be synchronized back to the HDD whenever there is a bit of free time. In the case of a power failure I could bear losing the last five minutes of work, but not everything since my last checkin.</li>
  </ul>
  
  <p><b>Added 2:</b> An idea that came up - use a normal RAM drive plus a background folder synchronizer (but I do mean <b>background</b>). Is there any such thing?</p>
  
  <p><b>Added 3:</b> Interesting. I just tried out a simple RAM drive at work. The rebuild time drops from ~14&nbsp;secs to ~7&nbsp;secs (not bad), but incremental build is still at ~5&nbsp;secs - just like on the HDD. Any ideas why? It uses <code>aspnet_compiler</code> and <code>aspnet_merge</code>. Perhaps they do something with other temp files elsewhere?</p>
  
  <p><b>Added 4:</b> Oh, nice new set of answers! :) OK, I've got a bit more info for all you naysayers. :)</p>
  
  <p>One of the main reasons for this idea is not the above-mentioned software (14&nbsp;secs build time), but another one that I didn't have access at the time. This other application has a 100&nbsp;MB code base, and its full build takes about 5 minutes. Ah yes, it's in <a href="http://en.wikipedia.org/wiki/Embarcadero_Delphi" rel="noreferrer">Delphi 5</a>, so the compiler isn't too advanced. :) Putting the source on a RAM drive resulted in a BIG difference. I got it below a minute, I think. I haven't measured. So for all those who say that the OS can cache stuff better - I'd beg to differ.</p>
  
  <p><strong>Related Question:</strong>  </p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/questions/501718/ram-disk-for-speed-up-ide">RAM disk for speed up IDE</a></p>
  </blockquote>
  
  <p><strong>Note on first link:</strong>
  The question to which it links has been deleted because it was a duplicate. It asked:</p>
  
  <blockquote>
    <p>What do you do while your code’s compiling?</p>
  </blockquote>
  
  <p>And the answer by <a href="https://stackoverflow.com/users/9476/dmitri-nesteruk">Dmitri Nesteruk</a> to which I linked was:</p>
  
  <blockquote>
    <p>I compile almost instantly. Partly due to my projects being small, partly due to the use of RAM disks.</p>
  </blockquote>