Slow Netbeans
Kelly O'Hair
kelly.ohair at oracle.com
Tue Dec 28 08:12:59 PST 2010
Nobody that I know of uses a 'debug' jdk build for much of anything,
why are you doing that?
If you really are debugging the jdk, try the 'fastdebug' build.
Otherwise, get the product build.
-kto
On Dec 27, 2010, at 11:01 PM, Kanik Chakravarty wrote:
> Hi
> I am using the debug build. The j2sdk java client version is
> openjdk version "1.7.0-internal-debug"
> OpenJDK Runtime Environment (build 1.7.0-internal-debug-
> kanik_2010_12_10_18_35-b00)
> OpenJDK Client VM (build 20.0-b03-jvmg, mixed mode)
>
> And doing a sharedump did improve the performance.
> I am reverting to a product build. Thanks again for the answers.
>
> Regards,
> Kanik
>
> On Tue, Dec 28, 2010 at 12:05 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com
> > wrote:
> What version strings next command produces with your jdk?
>
> usr/lib/jvm/j2sdk/bin/java -client -version
>
> You can also add -J-showversion to netbeans.conf to see if it is the
> same.
> We need to know what you are using to investigate it.
>
> I am also wondering about your statement: "I have not tried a
> product or fastdebug build".
> So what version did you build? If 'debug' than it is the reason of
> slowdown since
> you will get debug version of Java VM which is very slow due to
> additional checks.
>
> Thanks,
> Vladimir
>
>
> On 12/27/10 10:00 PM, Kelly O'Hair wrote:
>
> Also, after you copy a jdk image, try doing a cd into the jre/bin
> directory and running
> ./java -Xshare:dump
> that updates the class data sharing image which might help.
>
> Seems like this deserves some investigation. The jdk7 class files do
> have the StackMapTable attributes, I
> wonder if that could slow down NetBeans?
>
> -kto
>
> On Dec 27, 2010, at 9:01 PM, Kanik Chakravarty wrote:
>
> Hello
> Thanks for the suggestions.
> I have changed the netbeans.conf options from
> netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-
> XX:PermSize=32m -J-XX:MaxPermSize=200m
> -J-Dapple.laf.useScreenMenuBar=true -J-
> Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true"
> to
> netbeans_default_options="-J-client -J-Xss2m -J-Xms256m -J-Xmx1024m -
> J-Xverify:none -J-XX:PermSize=64m
> -J-XX:MaxPermSize=400m -J-Dapple.laf.useScreenMenuBar=true -J-
> Dapple.awt.graphics.UseQuartz=true
> -J-Dsun.java2d.noddraw=true"
> This has sped up the IDE a bit but is still slow.
>
>
> Additional Information
>
> I have 2 GB RAM.
> Previously when I was running Netbeans on OpenJDK 1.6. preinstalled
> with Ubuntu 10.10, it was really fast.
> Now I am running it on a build version of OpenJDK 1.7 from the
> sources. (I copied the j2sdk image from OpenJDK build
> folder to usr/lib/jvm and updated the symlinks in etc/alternatives).
> I have not tried a product or fastdebug build of
> OpenJDK 1.7.
>
> Thanks and Regards
> Kanik
>
> On Tue, Dec 28, 2010 at 8:18 AM, charlie hunt
> <charlie.hunt at oracle.com <mailto:charlie.hunt at oracle.com>> wrote:
>
> If your home directory is on a network file system, since there's
> a .netbeans directory in home directory which
> contains project meta-data ... depending how frequently the meta-
> data is accessed, it too can also impact
> performance. How frequently the meta-data is accessed depends on
> the operations you're doing.
>
> In the netbeans.conf file Kelly mentioned below, there is a
> definition for:
> netbeans_default_userdir="${HOME}/.netbeans/6.8"
> * Note: The netbeans.conf file is usually found in <NetBeans
> install dir>/etc/netbeans.conf
>
> If you point netbeans_default_userdir to a directory on a file
> system local to your machine, it may also help.
>
> You can also specify a "userdir" at a command line invocation of
> NetBeans:
> $ netbeans --userdir /path/to/some/directory
>
> The above would be an option if you didn't want to modify your
> netbeans.conf file to see if performance improves.
>
> I often times use the above convention to create distinct a
> "userdir" for each NetBeans project I work on.
>
> Also, to monitor JVM heap usage within the IDE, if the heap
> usage / memory icon in the toolbar is not enabled, you
> can enable it to observe JVM heap usage by selecting the menu
> item, View > Toolbars > Memory. Look to see if the
> menu item has a "check" beside it.
>
> You can also click on the heap usage / memory icon in the tool
> icon at any time to invoke an explicit Full GC,
> (unless you're using -XX:-DisableExplicitGC).
>
> hths,
>
> charlie ...
>
>
> On 12/27/10 04:48 PM, Kelly O'Hair wrote:
> e.g.
>
> My file ~/.netbeans/6.9/etc/netbeans.conf on my Mac laptop
> contains:
>
> # options used by netbeans launcher by default, can be overridden
> by explicit
> # command line switches
> #
> netbeans_default_options="-J-Xms256m -J-Xmx768m -J-
> XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none
> -J-Dapple.laf.useScreenMenuBar=true -J-XX:+UseConcMarkSweepGC -J-
> XX:+CMSClassUnloadingEnabled
> -J-XX:+CMSPermGenSweepingEnabled -J-
> Dorg.netbeans.modules.mercurial.level=100"
>
>
> But sometimes the reason NetBeans is slow is because by default
> it is scanning every source file, but
> usually that only happens when the project is opened, once.
> I'd need more information as to what part of NetBeans you think
> is slow.
>
> -kto
>
>
> On Dec 27, 2010, at 2:10 PM, John Pampuch wrote:
>
> Also, in many ways, Netbeans behaves a bit like a server
> application (namely, it is long running, and uses quite
> a bit of memory). Using the server compiler (add -server to the
> launch parameters) will help, though startup,
> and 'warmup' time will be a quite a bit longer.
>
> But start with heap space first!
>
> Note that Netbeans has its own configuration file where the Java
> parameters are set.
>
> -John
>
> On 12/27/10 1:08 PM, Jon Masamitsu wrote:
> One possibility is that you have too small a heap to run well.
> If you have not tuned your heap, try doubling its size and
> see if there is any improvement.
>
> On 12/27/2010 9:33 AM, Kanik Chakravarty wrote:
> Hello
> Does anybody use Netbeans for HotSpot development? Can anyone
> please suggest some tips to make Netbeans fast.
> Currently its painfully slow in my machine when using OpenJDK
> built from the sources. Thanks in advance.
>
> --
> Thanks and Regards,
> Kanik Chakravarty
>
>
>
>
>
> --
> Thanks and Regards,
> Kanik Chakravarty
>
>
>
>
> --
> Thanks and Regards,
> Kanik Chakravarty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20101228/0a2ea92c/attachment-0001.html
More information about the hotspot-dev
mailing list