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.
I wanted to update rmagick to the latest version of the gem, so I ran “sudo gem install rmagick”. The version that was going to be installed was 2.1.0, and it needed ImageMagick lib 6.3.x.
I went ahead and downloadoaded 6.3.8 from ImageMagick site (couldn’t use apt-get this time, latest version on repositories I found was 18.104.22.168). I had a previous version of imagemagick laying on my system. So I ran:
- sudo apt-get remove imagemagick
- tar xvvzf ImageMagick.tar.gz
- cd ImageMagick
- ./configure –prefix=/usr
- sudo make install
- sudo gem install rmagick
- sudo gem install rmagick -v 1.15.12 if you want rmagick v1 installed.
Just for the record, number problem one was to set up mongrel_cluster on init.d.
Soooo. Now “ruby script/console” fails with a “require ‘readline’ failure” or something. The problem was that, for some reason, when i built the ruby interpreter (1.8.6) the readline extension was not built and installed. ruby’s readline extension comes with the standard ruby distribution. So, i did a:
- “locate readline” (probably you will need a “sudo updatedb” before, or better just look for the source code of your ruby interpreter where you know it is. You know that, right? :)
- Went to the directory where your ruby source code lives, subdirectory ext/readline. In my case: “cd ~/packages/ruby-1.8.6-p110/ext/readline“
- “ruby extconf.rb” –this one generates the makefile for the library
- “sudo make install“.
In ubuntu you’ll problably need libreadline5 and libreadline5-dev _before_ running make:
“sudo apt-get install libreadline5 and libreadline5-dev”
Now “ruby script/console” should work.