Sunday, January 17, 2010

Speed up compilation process with Ram Disk

I often review my software development toolbox to check if I my development process is actually optimal. Recently I was looking around if there is something new in the area of compilation time improvements. There are classics like IDE settings for Visual Studio and even more for Eclipse, maximum amount of RAM (unfortunately my notebook has 4Gb limit) and speedy hard disk options like 7200RPM and SSD disks. But there is something new (for me at least). All of you are familiar with DVD disk virtualization utilities. But what if we could have a virtual RAM disk? Something like ramdrive.sys from MS-DOS times. Then we could put our complete project folder on that disk and theoretically the compilation process, which has lots of disk read/writes, should speed up.

Before you try this option on your current project I should remind you that in case ram disk fails you loose all your work since the last backup! All these utilities provide persistence to disk image file, but how do you know that it won’t be corrupted somehow. I hear you saying that you often commit to your source control, so do I. Then in case of your very unlucky day when everything just breaks you should lose at most a few hours of work.

Below is the list of utilities:

QSoft Ramdisk –  My choice. Commercial but free for 6 months and a good price. Just runs. Runs on 64bit Windows. Do not be afraid of their confusing web site :)

Dataram Ramdisk – Would be my choice. Commercial with free option for up to 4Gb size disks. Seems to be the most popular and convenient, but I could not run it on Windows 7 64bit (compatibility mode does not help)

Superspeed – another popular commercial utility with lots of features.

Farstone Virtual Hard Drive PRO – commercial. Seems to be a good option with good reviews on blogs.

Softperfect Ramdisk – commercial. I did not try it myself

VSuite Ramdisk – commercial. I did not try it myself.

Tuesday, January 5, 2010

Class Not Found Issue in Eclipse

Recently I have come across a really strange bug in Eclipse 3.4.2 version. After adding new java class Eclipse refused to find it. And suddenly, it marked all my custom class imports as not found. Cleaning project, restarting IDE would not help. If you experience the same problem there is a simple quick solution. All you need is to change “Default output folder” in Project Properties/Java Build Path. Once you change output folder all those “class not found” errors will go away. Strange enough, but now you can change output folder path to the previous value and it will still compile correctly.

I am not sure what is the real cause of this error,  one possibility is that maven plug-in somehow interferes with the process. If it is Eclipse itself then upgrade to 3.5 version may resolve this issue. Need to check.