Back to Netbeans

Gladly I would like to share that last week I made a successful come back to using Netbeans. I used to be using Netbeans a lot for C++ programming, mostly because of its convenient compiler function. In a previous post, about Flex development on Linux, I mentioned though having some performance issues with Netbeans. The main issue was that switching from one file to another would sometimes take like 5-10 seconds. If you switch between files a lot you lose a lot of time that way.

Last week the Netbeans team announced the availability of an updated version of their IDE, version 6.7.1. I decided to give it a try. So I went ahead and downloaded the version for PHP. For a change I installed it as a root user. In Linux world root user is more-or-less equivalent to administrator user on Windows. Furthermore, Linux makes it possible to install applications system wide (requires root privileges)  or for a separate user. This far I’ve been installing Netbeans (and other IDE’s, like KomodoEdit and Aptana) just into my home directory, plainly out of laziness (skipping entering the root password saves around 2 seconds! ;-) ).

As soon as I started the IDE I noticed it was slightly speedier. That might be due to a new version, but I sort of decided it was due to installing it system wide. Anyway, the speed improvement encouraged me to look for some more ways of speeding up Netbeans performance. I found two sources of help, both hosted by Sun. The first one is a blog entry about how to kill Netbeans performance, but fortunately some people figured out the opposite in the comments under the actual post.

The other one is a Netbeans how to on improving the application’s performance tuning JVM switches. Both were equally helpful and as a result I ended up with the following settings in my netbeans.conf file (found in netbeans home (where you installed netbeans) etc directory – in my case it’s /usr/local/netbeans-6.7.1/etc):

netbeans_default_options=”-J-client -J-Xss2m -J-Xms256m -J-Xmx512m -J-XX:+UseConcMarkSweepGC -J-XX:+CMSPermGenSweepingEnabled -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenPrecleaningEnabled -J-XX:PermSize=64m -J-XX:MaxPermSize=512m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.opengl=true -J-Dsun.java2d.d3d=false”

Since making the changes Netbeans works noticeably faster. For some the drawback might be that it uses more RAM. But I don’t really mind that, since I have enough of memory on my machine (2GB). So now I’m happily back to using Netbeans, which doesn’t mean I have abandoned other IDE’s/editors. I’m still going to use Komodo Edit, Geany and Aptana. Though Netbeans is definitely the favourite one.