The Best Way....
- Go to prog.Files -> Netbeans -> etc->netbaens.comfig
- copy replace this
- netbeans_default_options="-J-Xms384m -J-Xmx998m -J-XX:PermSize=32m -J-XX:MaxPermSize=96m -J-Xverify:none"
- Restart NetBeans
Solution: 1
The most simple thing is to edit the netbeans config so it doesn't
load all your projects.
you can always reopen the other projects from the menu. once all the
projects you arent using are closed they wont be scanned each time you
start netbeans
Solution:
Just change the following line in netbeans.conf found under etc folder
# ${HOME} will be replaced by JVM user.home system property
netbeans_default_userdir="${HOME}/.netbeans/changeme"
Solution:2
And another quick thing you can do just delete the nbproject folder
inside your project then open the NeteBeans. then the project remove
from the list. this I do some times when it got freeze
Solution:3
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. If you are unable to resolve the problem, ask on the nbusers mailing list or file a bug. It might be needed to provide a memory dump or a CPU profiling snapshot.
- Slow Project Scanning: See NetBeans IDE is scanning/parsing/indexing for ages?
- Problems related to memory usage If your Java process
requires more memory than the underlying OS can provide, this 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? , and How do I set the JVM's heap size?
It is sometimes useful to increase the amount of memory available to the application to allow it to manage memory more efficiently. 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. Note: the ScanOnDemand plugin can sometimes help these issues. In all cases, a slow device can cause slowdown of the whole application. Typical examples are:
- Accessing resources on network drives or plugable drives like USB disks.
- Accessing resources storages using compression or encryption.
- Anti-virus applications guarding all accesses to files and scanning all executables (Tip exclude directories from scanning such as .netbeans, build).
- Drive indexing (e.g. on Windows) running in parallel.
- 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. New SSD disks may help a lot as well (look for the latest models that don't have the bottleneck in processing many small I/O requests).
- Problems with graphics
Sometimes the performance of painting operations can be a bottleneck (or can even cause system instability). In this case make sure to use the latest available version of the JVM and to update 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 the 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: [Http://bugs.sun.com/bugdatabase/view_bug.dobug_id=5095398 5095398: Graphics performance degrades unacceptably when XPS laptop unplugged (Win XP)]. The work around 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.
- Switching to a More Current JDK
- Check the release notes to determine the JDK version that is best for the NetBeans release that you are using, and switch to it.
- If you are using Mac OS X, see NetBeansMacOSX for some hints on resolving certain JDK related problems. For example if Mac OS X keeps using JDK5 by default, even after you have installed JDK6.
- Other JDK related problems
Changing your JVM's heap size can have positive 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 Disabling Modules.
Generally, installing too many add-ons and unstable plugins can affect the performance of the whole IDE.
- Maximizing Windows
Restoring a previously minimized application window can take a 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 Browser 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.
- Slow Visual Designer (J2ME)
If your Netbeans uses Orthogonal Router to draw the connections between the forms, this looks very nice, but slows done the IDE when you have several components. You can recompile Netbeans and change the router inside FlowScene.java / mobility pack. But be aware, recompiling probably is not a task of some minutes. For Netbeans 6.9.1 you just can download and replace the module: org-netbeans-modules-vmd-flow.jar
Solution:4
I use NetBeans 6 all the time on my Mac laptop and have learned how to configure it
to run more effectively for me.
NetBeans, like any Java application needs room to work, and the default memory settings
for Java and NetBeans are usually not what I consider ideal.
Of course how would they know what is ideal, you need to tell it.
Granted my solution may not be ideal for others, but it's worth playing with.
I'm using jdk5 update 13 on my Mac, but these same setting should apply to jdk6 also.
And it's not just for The Mac or even NetBeans 6, this should work on any platform.
KellyMacBook<3> cat ~/.netbeans/6.0/etc/netbeans.conf
netbeans_default_options="-J-Xms256m -J-Xmx512m -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"
Any change to this file will require a reboot (there should be one line in the file
above, I had to break it up to get the blog to display it in a readable way).
Also, turn on the View->Toolbars->Memory to keep track of the NetBeans memory usage, clicking
on it will force a GC, and you can get a feeling for how much memory your NetBeans
session needs, making adjustments to the maximums above.
And my recommendation is that the maximum (-J-Xmx) setting should never be more than
the RAM on the machine minus 512m, or system memory thrashing may occur.
Additional information can be found at
the NetBeans FAQ on GC pauses
and
the NetBeans FAQ on configuration.
The above settings make a world of difference in the way NetBeans performs for me.
Solution:5
Optimize and speed up Netbeans
In /etc/netbeans.conf set netbeans_default_options to-J-client -J-Xms32m -J-Xmx512m -J-XX:PermSize=32m
-J-XX:MaxPermSize=200m -J-Xverify:none -J-XX:CompileThreshold=100
-XX:+CompressedOOPS -XX:+AggressiveOpts -XX:+TieredCompilation
-XX:+DoEscapeAnalysis -XX:+UseConcMarkSweepGC
-J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled