An answer (see below) to one of the question right here on SO gave me an idea for a great little piece of software that could be invaluable to coders everywhere.
I'm imagining a RAMDrive software, but with one cruicial 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 RAMDrive would synchronize its contents with the HDD in background using only idle resources.
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.
Added: Some solutions have been suggested which I discarded in the very beginning. They would be (in no particular order):
- Buy a faster HDD (SSD maybe or 10K RPM). 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 envoronments where hardware modifications would be unwelcome if not impossible - say in at the office.
- Let OS/HDD do the caching - it knows better how to use your free RAM. The OS/HDD have generic cache algorithms thar 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. ;)
- There are plenty RAMDrives around, use one of those. 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 bare loosing the last 5 minutes of work, but not everything since my last checkin.
Added 2: An idea that came up - use normal RAMDrive plus a background folder synchronizer (but I do mean background). Is there any such thing?
Added 3: Interesting. I just tried out a simple RAMDrive at work. The rebuild time drops from ~14s to ~7s (not bad), but incremental build is still at ~5s - just like on the HDD. Any ideas why? It uses aspnet_compiler
and aspnet_merge
. Perhaps they do something with other temp files elsewhere?
Added 4: Oh, nice new set of answers! :) OK, I've got a bit more info for all you naysayers. :)
One of the main reasons for this idea is not the above mentioned software (14s build time) but another one that I didn't have access at the time. This other application has 100MB code base, and it's full build takes about 5 minutes. Ah yes, it's in Delphi 5, so compiler isn't too advanced. :) Putting the source on a RAMDrive resulted in a BIG difference. Got it below a minute, I think. Haven't measured. So for all those who say that OS can cache stuff better - I'd beg to differ.
Related Question:
Note on first link: The question to which it links has been deleted because it was a duplicate. It asked:
What do you do while your code’s compiling?
And the answer by Dmitri Nesteruk to which I linked was:
I compile almost instantly. Partly due to my projects being small, partly due to the use of ramdisks.