Thursday, February 11, 2010

Do not use 64bit JDK when coding in Scala

I recently upgraded to 64 bit Ubuntu Linux to make use of the 6 gigs of RAM by boss had bought me. I used the Synaptic package manager to install the JDK because I enjoy the work being done for me.

My machine felt faster and really powerful, except that the multi module maven build, using the maven scala plugin when from 4 minutes to a whopping 8 minutes.

What this boils down to is that the 64 bit JDK does not support client mode (-client), only server mode. Since scalac is pretty short lived, it is really hindered by the startup cost of server mode. Scala builds times double and triple.

This was easy to remedy. Even though 64 bit Ubuntu does not have the 32 bit packages, one can grab the 32 bit binaries from java.sun.com, and they will work just fine.

No comments: