Why is NetBeans still so slow?

Today I had an opportunity to use NetBeans 6.0 Beta 1. Just for the record, it was used on a uniprocessor Core 2 Duo system, with 2 GB of RAM. The operating system was Ubuntu Linux, with the nVidia OpenGL drivers installed, on Sun’s 1.6 JVM. The Java 2D OpenGL pipeline was enabled, as well.

My first impressions of this new NetBeans release were not completely good. Now, I realize that this is the initial beta release, so I’m hoping that things will improve vastly by the time the final release is available. But I would think by this time that things would have improved.

The main complaint I have revolves around the responsiveness of the UI. To be concise, it feels sluggish. Now, I was using it on a fast, modern system with more than enough RAM. Hardware-accelerated rendering should have been available, via the nVidia drivers and the Java 2D OpenGL pipeline. So I don’t think there’s any excuse for why the UI felt slow. The opening of the menus, for instance, should be nearly instantaneous. Dialogs should appear more rapidly, as well.

Having done much development using Eclipse as my development environment, I have come to enjoy the fast, native GUI offered by SWT. With each new release, I find it getting faster, although it offers more features. But that doesn’t seem to be the case with NetBeans, unfortunately. Each release I’ve tried has felt slower than the last, although the hardware I’m using tends to be better and better.

On a positive note, it does offer quite good integration with GlassFish and Tomcat. This integration can prove quite useful when developing enterprise-grade Java applications. It is especially a good productivity booster, as it allows for rapid development and deployment.

I’m not sure if the tight integration with the various Java deployment platforms really outweighs the sluggishness of the UI. Were Eclipse not around, NetBeans would be quite an attractive option. But I like my development tools to feel fast, especially on new hardware. Eclipse meets that criteria well enough. NetBeans does not. Thus I see only a limited use of NetBeans for my future developments.

24 Responses to “Why is NetBeans still so slow?”

  1. kawazu Says:

    Maybe it’s an nVidia / OpenGL issue? Running NetBeans 6.0 daily-build on a machine more or less similar to yours (Toshiba notebook, Core2Duo cpu, 2 gigs of RAM, though an intel-something mobile display chipset, running Ubuntu 7.10 testing), I can hardly say the GUI is slow and/or unresponsive. Actually, I have moved from Eclipse3.3 to NetBeans a while ago also because NetBeans, on this machine and in my projects, tends to feel a lot faster than Eclipse/SWT…

  2. Alan Says:

    I’ve had almost the exact opposite experience with Netbeans. It’s getting faster and more responsive.

    A few thoughts…

    1) I’d leave the openGl pipeline off for now. No point in confusing the situation.

    2) It’s possible the JVM might be running with the server JVM because of the memory size on your machine. Try using ‘netbeans -J-client’ just to make sure. This wouldn’t impact eclipse as much because of SWT, but would impact swing based applications.

  3. KlausStake Says:

    Hi,

    I use Netbeans 5.5.1 (everyday) and Netbeans 6 beta 1 (for evaluation). I cannot confirm any speed degradations. Both IDE versions feel comfortable and fast on my desktop (Windows XP, nVidia, 2GB RAM). Do you have large projects, you are working with? If yes, you might have to reconfigure the IDE’s runtime properties:

    Exit NetBeans, edit the file …/etc/netbeans.conf. For example,

    netbeans_default_options=”-J-Xms512m -J-Xmx1024m -J-XX:PermSize=32m -J-XX:MaxPermSize=128m -J-Xverify:none

    This can increase speed a lot if you are using large projects and/or using many plugins.

    Of course it will also help (sometimes) to disable unnecessary plugins.

    Have fun,
    Klaus

  4. bhaskar Says:

    I have the very exact experience about Eclipse. On my box (P4 3GHz, 4 GB ram), Netbeans has been running very smoothly since 5.5 and now 6.0m10 , 6.0beta1.

    But eclipse has always been sluggish (3.1,3.2 and the more recent 3.3). My biggest problem with eclipse, is that the UI completely freezes for more than 30 secs or so, every now and then, my suspect is the garbage collector, but It is totally unacceptable that UI should freeze for that long.
    Often at times, I have given up and just restarted eclipse. These days anyway I am happy with Netbeans.

  5. Ryan Says:

    That is interesting. I’m on an older computer: Pentium M 1.7 GHz, 2 GB memory, Windows XP SP2. I used to find the milestone builds sluggish but the work done in the last month has greatly improved performance. Startup time (to a usable state) went from 30 seconds to 10 seconds. All menus are snappy, popup windows open instantaneously, etc. Swing vs SWT is a non issue these days for me.

  6. Ryan Says:

    I posted a comment earlier and now it is gone. Was it deleted?

    It is really interesting to see users reporting completely opposite experiences in NetBeans 6 performance. I’ve seen some people say that it is so slow that they could never use it. Other users including myself don’t experience these issues at all.

    I’ve noticed an improvement in the performance of daily builds compared to last month. I’m using a Pentium M 1.7 GHz computer with 2 GB memory and Windows XP SP2. NetBeans 6.0 loads and is ready to use in 10 seconds. The menus feel snappy, popups open instantaneously, and it feels fast in general. Swing vs SWT is not an issue for me these days. I would not say that Eclipse is any faster.

    I’m wondering if you were experiencing slowness because the IDE was busy scanning classpaths? It would say so in the status bar.

  7. Gary Keim Says:

    I actually went back to Eclipse 3.2 from 3.3 because of the increased sluggishness I was experiencing. My guess is it’s due to new, default plugins that come pre-installed.

  8. Naoki Says:

    I tend to agree with pinderkent. Netbeans is prone to occasional freezes especially when you first open the IDE and start exploring around. It leaves a really poor impression.

    Example: I just installed NetBeans IDE 6 beta1, here’s a rundown of my experience.

    Start up is about the same as eclipse, plus NB gives you a loading bar. Both are glacial compared to Slickedit or Visual Studio.
    Then I went through a RoR project setup (smooth, fast)
    Clicked on a .rb file for first time (app unresponsive for ~5 seconds)
    Clicked on a .rhtml file for first time (app unresponsive for ~5 seconds)
    Clicked on a .css file for first time (app unresponsive for ~5 seconds)

    From a user interface standpoint, users will forgive load times (even though some IDE’s such as visual studio is lightening quick in all aspects), but to not show a load animation is unforgivable.

  9. williamchen Says:

    Hi,

    I know what’s wrong with your netbeans. There’s a swing bug which can serously slow down any swing application including netbeans. The bug description can be found here:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5095398
    Strictly speaking, it is a not a swing bug, but an ATI driver bug. It will happen if your machine is a laptop and if you enabled POWERPLAY and working with power off. I can imply that your machine is a laptop. With 2GB RAM, any swing application should be very fast including netbeans, if it were not for the bug. An easy solution is to disable the POWERPLAY of your lap. For complicated solution, you can refer to the bug description.

  10. David Littman Says:

    I have a somewhat older machine (Celeron + 1 gig) but to flip between Java view and Design view can take a minute (no kidding) and even resizing the editor pane can lead to a 1 minute delay.

    When I use NB for RoR development, it is lightening-fast.

    I therefore think this issue is due to very poor algorithms for parsing/rendering the gui vs. code display.

    I used Visual Cafe (!) years ago on a pretty slow machine and the parse/render cycle was very fast.

    I believe this is giving many people a very bad impression of a really good dev env — maybe the best out there.

    Thanks for listening.

  11. Joren Says:

    At williamchen,

    I seriously doubt this bug is the only reason for netbeans being so slow. I have an nvidia card and my netbeans is currently just sitting there not responding to anything & maxing out my cpu.

    I haven’t worked much with netbeans (always used eclipse), but now we have to for our course mobile programming. But in the 2 months i’ve been using it i found out 3 things:
    - it’s ugly compared to eclipse (yes i’m shallow)
    - it’s SLOW. It takes netbeans a minute or so to recognize a mistake (or that is has been corrected).
    - it’s buggy. It’s still maxing out my cpu (15 minutes and counting) after i tried to import a package.

  12. williamchen Says:

    This is what I got from netbeans website. Check if it applies to you.

    There are various reasons why the IDE can be slow or unresponsive. The most frequent ones will be described here with hints how to improve the performance.

    * Problems related to memory usage
    If your Java process requires more memory than underlying OS can provide it can cause swapping of pages from/to disk. This results in significantly degraded performance. See the following topics how to address this problem: What are memory requirements of Netbeans IDE? , What is the usual memory usage of Netbeans IDE? , How do I set the JVM’s heap size?
    Contrariwise it is sometimes useful to increase amount of memory available to the application to allow it manage memory more effectively and this can reduce the time spent during garbage collection cycles.

    * I/O operations slowing down the IDE
    During some tasks the IDE is performing many I/O operations. With a slow device this can cause slowdown of the whole application. Typical examples are resources accessed on network drives or plugable drives like USB disk, storages using compression or encryption and anti-viruse applications guarding all accesses to files. Notebooks running on batteries have slower I/O too. Many machines have a 5400RPM hard drive by standard. Upgrading this to a faster 7200RPM device can make a very big difference.

    * Problems with graphics
    Sometimes the performance of painting operations can be a bottleneck (or can even cause system instability). In such case it is useful to make sure that the latest available version of JVM is used as well as up-to-date drivers for the graphic devices. Java2D Graphics and Imaging page contains references to documents that can help here.
    Some graphic card drivers were reported to cause significant performance problems. Often the command line switch -J-Dsun.java2d.d3d=false which disables DirectDraw can help.

    * Performance degrading over time
    This can be a result of memory leaks and it often leads to an OutOfMemoryError later. It is discussed in What can I do if Netbeans IDE runs out of memory (OutOfMemoryError is thrown)? topic.

    * Problems when running on battery power on Windows XP
    This is caused by JDK BugID: 5095398: Graphics performance degrades unacceptably when XPS laptop unplugged (Win XP) . The work aound is to use the command line switch -J-Dsun.java2d.ddoffscreen=false, which disables the use of DirectDraw and Direct3D for offscreen images. Alternatively, you can also adjust the PowerPlay settings for the ATI chip. Users can access this through the Advanced button on the Settings tab of the Display Control Panel. Disabling PowerPlay makes unplugged performance equivalent to plugged-in performance (at the cost of higher battery power consumption, presumably).

    * Problems when using the power saving features of the AMD Turion processor
    Several users have reported that using the command line switch -J-Dsun.java2d.ddoffscreen=false, which disables the use of DirectDraw and Direct3D for offscreen images solved the performance problem they were seeing on Turion-based laptops. Alternatively, you can disable the power saving features of the Turion.

    * Other JDK related problems
    Changing your JVM’s heap size can have positve effects on machines with little RAM. JDK1.5 troubleshooting guide or JDK6 troubleshooting website are good sources of information about JDK.

    * Problems with Add-ons and Modules
    On slower machines you can gain performance by deactivating bigger IDE modules that you rarely use. You can also go the opposite way and install the slimmer BlueJ edition of the IDE, and then reactivate modules that you need. Read more about Disabing Modules.
    Generally, installing too many add-ons and unstable plugins can affect the performance of the whole IDE too.

    * Maximizing the Window
    Restoring of previously minimized application window can take certain time because there is a lot of I/O (partly because the application can be paged out of memory, partly because of up-to-date check that is running in such a case).

    * File browsing bug
    If the IDE slows down every time you use a file browser, try to move all zip files from your desktop as a work-around.

  13. Sam Lalani Says:

    The problem is not with Netbeans, the problem is with Ubuntu and Java 6. For some reason, Java 6 applications which run great on my Windows XP and Windows Vista, run VERY, VERY slow on Ubuntu.

  14. Hero Doug Says:

    I don’t think this is a Linux issue or a Windows issue since people from both operating systems report a slow UI.

    After I start Netbeans (Beta 2) and check the processes there’s always a new java.exe process, and it usually sit’s around 130,000K for Mem Usage.

    The next highest is Opera at 18,000K

    This is the first application I’ve caught using over 100,000k

    I did a bit of a quick test and starting netbeans via the command prompt using “netbeans -J-client” helped responsiveness a lot, it brought it to a workable speed.

  15. Mark Says:

    Hi,

    I was(am) long fun and user of Netbeans. In fact I tried Eclipse few years ago and found that NetBeans fits more to my neads. But performance of version 6 Beta 1 forced me to switch to Eclipse 3.3. I have Celeron 1.6 and 1Gig of Ram but netbeans editor is very unresponsive for my taste. I found NetBEans very feature ritch, providing consistent enviroment for development. I’ll try to install 2 gig of ram in computer and download Beta2. but if performance will not improve I have to move to Eclipse.

  16. Gary Says:

    Thanks! Turning off PowerPlay resolved the slowness I was seeing in Netbeans 6 Beta 2 on Win XP in battery mode. Leaving PowerPlay on and using the -J-Dsun.java2d.ddoffscreen=false option also seems to work for me. Might not be as good as having PowerPlay off though.

  17. javero Says:

    Hello,

    I have to report a performance problem, not with netbeans at all, but more simply with java swing components (and probably others) under a particular configuration.

    My personal conclusion is:

    In my case, I can grant that netbeans are not responsible for bad graphical performance: the problem is due to the installation of a graphic card: bad hardware or bad settings (as mentioned in the above posts), I did not discover the real cause up to now).

    Hope that this example can help some netbeans users to solve their problem, having also another track to investigate.

    Good luck to all…
    javero

    ————————–
    Here is the detail:
    ————————–
    Absolutely no performance problems on my configuration, great performance:

    - netbeans ide 1.6 beta 1 / jdk1.6.0_03 /
    - os linux ubuntu 2.6.20.15
    - graphic card nvidia geforce 7300gt
    - cpu core 2 duo 2.66 mhz
    - memory 1gb

    BUT: A friend of mine is using (on an old pc, with poor configuration) a simple applet that I developed, which includes some swing components to enable a display and a menu selection.

    Everything worked perfectly, at very reasonable speed, although his computer was an old one, 433 Mhz / OS windows 98. NO PROBLEM AT ALL with that. The problem appeared when he had to change his graphic card to: nvidia geforce 4ti 4600. Since then, even the fact of opening a sub-menu takes several seconds. And the display drawing is dramatically slow, at least 40 seconds to complete (in the past it was quick enough to spare us the idea of any measure).

    This friend grants me all other programs behave correctly under his configuration. Only my applet was affected with the graphic card change. This is not solved now, I am still investigating (that’s why I happen to read this above topics).

  18. javero Says:

    … mistake in giving my e-mail in previous post.
    any question or information better asked here… sorry
    javero

  19. Stuart Says:

    I’m glad there’s someone who’s first instinct is not to mindlessly heap praise on Netbeans.

    I’ve been trying to switch from my current Aquamacs/Terminal workflow to an IDE for quite some time to take advantages of unit testing and code re-factoring tools (among others) - having tried Eclipse I found that it simply took up too much screen space… where is my code? :-) (a little exaggeration)

    Netbeans in the past when I was a Windows user was always fairly solid, so when a friend recommended the new 6.0 beta I immediately headed over to check it out.

    My system now is a 2Ghz Core 2 Duo with 1GB RAM. Having started Netbeans I was a little concerned at the new ’shiny’ interface - ‘nonstandard interfaces’ always have this effect on me. I was also disappointed to note that on some occasions after clicking on menu items (or tabs in preferences) it could take around 5 seconds to perform the action - I’m fairly certain I can blame this new [shiny] interface.

    I wish there was the option to revert to an older more robust framework but it seems for now I’ll continue using editors and terminals - if that’s what it takes to work quicker.

  20. Mugen Says:

    I am learning Java using Netbeans 6, and I also use Visual Studio, I am not a MS fan or Sun hater, but VS seems much faster. Any comments?

  21. Leandro Says:

    I have netbeans 6.0 with windows Vista, and Avast Antivirus on.
    My computer is a Sony Vaio fe780g with 2 gb of RAM.

    I experienced the same problem the IDE was terribly slow with very large time swaping the disk, the solution for me was stop the antivirus, and netbeans works perfectly now.
    For more information of this issue go to this direction.

    http://forum.java.sun.com/thread.jspa?threadID=5197161&messageID=9779263

  22. Ryan Says:

    I found that the largest slow-down for me was that the sun appserver was being loaded. I disabled this by modifying NetBeans-5.5/etc/netbeans.conf and removing -J-DAM_CONFIG_FILE=\”\” -J-Dcom.sun.aas.installRoot=\”\” from netbeans_default_options. I also set -J-Xms256m instead of -J-Xms32m.

  23. Why should we have to tune the JVM’s memory parameters to run NetBeans acceptably? Says:

    […] date with their developments. The last time I tried it, the results were rather terrible. I found NetBeans 6.0 Beta 1 to be extremely slow, even on a modern system with a multicore CPU and gigabytes of RAM. It wasn’t just a matter […]

  24. Rhys Says:

    I find that NetBeans 6.0 runs very well on Windows XP but runs slowly (e.g. sluggish menus) under Ubunto 7.x. Eclipse on the same Ubunto machine runs very well by comparision. It amazes me that doing something a simple as the rendering of a menu should actually be visible at all these days.

    BTW, in a past life this same Ubuntu machine was running Red Hat Linux 8.x and NetBeans 3.6 was extremely quick and nice to use in that environment.

Leave a Reply

*
To protect against spam, please type the word in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word