Slow Netbeans? Some tips I tried
UPDATE: tweak Netbeans configuration file.
Yeah NB can be slow sometimes. If you have some spare RAM megabytes you can make use of this old trick. I remember using this same trick to speed up Quake execution 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.