Old Emmanuel Oga's Weblog (new one is at www.emmanueloga.com)

Slow Netbeans? Some tips I tried

Posted in ubuntu, Uncategorized by emmanueloga on marzo 20, 2008

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 ….

    UPDATE:

    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.

    Setting up rmagick (needs ImageMagick 6.3.x) on Ubuntu

    Posted in imagemagick, linux, rmagick, ruby, ubuntu by emmanueloga on enero 25, 2008

    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 6.2.4.5). I had a previous version of imagemagick laying on my system. So I ran:

    1. sudo apt-get remove imagemagick
    2. tar xvvzf ImageMagick.tar.gz
    3. cd ImageMagick
    4. ./configure –prefix=/usr
    5. make
    6. sudo make install
    7. sudo gem install rmagick
    8. sudo gem install rmagick -v 1.15.12 if you want rmagick v1 installed.

    That’s all!

    (I got info from this thread)

    Ubuntu gutsy problem number two: ruby script/console fails to start (readline)

    Posted in rails, ubuntu by emmanueloga on noviembre 29, 2007

    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
    • make
    • 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.

    Tagged with: , , , ,

    Script de arranque nginx

    Posted in nginx, rails, ubuntu by emmanueloga on noviembre 13, 2007

    http://pastie.caboo.se/117444

    That’s all folks :)

    Tagged with: , ,
    Seguir

    Recibe cada nueva publicación en tu buzón de correo electrónico.