Faster NetBeans? Yes, it is posible… :)
Yeah NetBeans can be slow sometime. So you say you had some megas of ram unused? Great. This trick is as old as … as something very old :-). I remember using this same thing to speed up quake on ms-dos.
- Uninstall Netbeans
sudo mkdir /media/ramdisk sudo mount -t tmpfs none /media/ramdisk
- Then install netbeans to /media/ramdisk
That’s all :)
Off course, you will need a decent amount of ram. NetBeans uses like 95mb of disk for version 6.0.1 (linux)
I found that tmpfs writes its contents to the directory it was mounted to once you unmount it, so it should persist its contents between system boots! I just needed to update /etc/fstab with this line: “tmpfs /media/ramdisk tmpfs”
For Windoze, you should Google for ramdisk support. I can’t get precise measures on the gain in performance, but I found that installing NB to ram really speeds things up. Now I should try to install the whole ruby interpreter in my ramdisk ….
Amit Kumar Saha pointed out that tmpfs does not keep its contents to the disk on reboot. He is right. I manually unmounted the ram disk an it _did_ keep its contents to the disk, so I thought it was going to keep the contents also when booting. But when I did boot my pc, it didn’t work the same. To work around this, I did a tar package of my installation:
cd /media/ramdisk tar cvvzf /home/emmanuel/tar/nb601.tar.gz netbeans-6.0.1/
Then added this line to my /etc/rc.local:
tar xvvzf /home/emmanuel/tar/nb601.tar.gz -C /media/ramdisk
That surely worked on reboot. Off course I will have to create the tar again everytime I change something in the ramdisk.
It would be great to provide this tip for OpenSolaris