How to improve Netbeans performance?

前端 未结 29 1747
情书的邮戳
情书的邮戳 2020-12-22 17:30

Is there a real way to get Netbeans to load and work faster?

It is too slow and gets worse when you have been coding for some time. It eats all my RAM.


相关标签:
29条回答
  • 2020-12-22 17:56

    Here are my netbeans options for etc/netbeans.conf using G1 GC and some other improvements.

    netbeans_default_options="-J-server -J-Xss4m -J-Xms256m -J-Xmx512m -J-XX:PermSize=256m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Xverify:none -J-XX:+UseG1GC -J-XX:+TieredCompilation -J-XX:+AggressiveOpts -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd -J-Dorg.netbeans.editor.aa.extra.hints=true"

    The font settings (swing.aatex and following) are optional - set as you need or remove.

    Those settings are boosting my netbeans a lot!

    0 讨论(0)
  • 2020-12-22 17:56

    In order to improve Netbeans startup and build times one should (in this order):

    1. Make sure that one has enough free RAM memory (4GB Windows is enough on my 64-bit system)
    2. Buy an SSD, it makes all the difference in startup time and build time (my project build time wend from 60 seconds to 6 seconds!)
    3. Watch out for the virus scanner, they can slow down random file access considerably (make sure they don’t scan your .java and .class files!)
    4. Buy the fastest processor you can get your hands on.
    0 讨论(0)
  • 2020-12-22 17:56

    I had big problems with NetBeans 8.0.2. It's an old question but perhaps somebody else will end up here like me with the same problem, and I found no answer that helped me anywhere.

    I have NetBeans 8.0.2 with Ruby on Rails plugin, on Windows 7. The IDE was hanging up to 10 seconds on almost every change I did in some files. It was problem only with big files, but it must depend on more than that, there were other big files without the problem.

    The problem was caused by the "hint" "Rails 3 Deprecations", I turned it off and now it's very fast, I can have everything else turned on without problems.
    It's under Tools -> Options -> Editor -> Hints.

    There is also some suggestions in the other answers of optimizing with startup parameters. I found these links about JVM-switches that helped me when testing to optimize (but it turned out that these settings have nothing to do with my problem), they are very old but have some useful information:
    Explanation of JVM-switches.
    Some (old) recommendations

    0 讨论(0)
  • 2020-12-22 17:57

    Also defragment your disk. Netbeans is very aggressive about creating caches of one form or another. Most of them get persisted to disk at some point or another which can affect startup time. Virus scanners (Symantec in particular), Desktop search engines, and any other intrusive I/O product can drastically reduce performance.

    I have noticed that Netbeans can be tempermental at times and its performance can vary greatly between two machines with nearly identical specs. My work machine has terrible performance and is unusable at times, but it's lightning fast when I use it on my home machine (with bigger projects in many cases).

    0 讨论(0)
  • 2020-12-22 17:57

    I've decided to research for last time why my NetBeans was running slow.

    I am running PC with 16GB ram and 3.5GHz 8 Core Processor. My CPU usage is around 5-20%, memory is below 40% yet NetBeans is slower than my 15-year-old PC that I have stashed in the garage.

    After finding this topic and going through http://wiki.netbeans.org/FaqSlowNetBeans I have realised that in the bottom right corner of the NetBeans I keep seeing a bar that states "Scanning...", after trying to stop it and nothing happening I have looked further at what "Scanning..." was doing and I have realised:

    Each time I start the NetBeans, the NetBeans will automatically scan any open projects.

    And here it is, I've closed 20 opened projects and NetBeans runs as fast as Notepad.

    0 讨论(0)
提交回复
热议问题