I’ve some troubles editing large files (over 1Mb) with Netbeans: editing gets slower and freezes for many seconds. The IDE Faq actually says: “The IDE automatically determines optimal Java VM memory settings based on the size of physical memory. Rarely you might want to change the heap size.”

Since the performance are disappointed I want to give a try anyway. In my netbeans.conf I had the following line:

netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true"

Which I changed to:

netbeans_default_options="-J-client -J-Xss2m -J-Xms256m -J-Xmx1024m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled"

The main changes are -J-Xms256m which tells Netbeans to start with a heap of 256Mb and -J-Xmx1024m which is the maximum heap size (1024Mb).

The bottom line: I didn’t have a performance boost and I decided to edit the very big files with Scite which does a much better job.