Netbeans 성능을 향상시키는 방법은 무엇입니까?
Netbeans를로드하고 더 빠르게 작업 할 수있는 실제 방법이 있습니까?
너무 느리고 한동안 코딩을하면 악화됩니다. 내 모든 RAM을 먹습니다.
저는 Windows 컴퓨터, 특히 Windows Server 2008 Datacenter Edition x64, 4Gb RAM, 3Ghz Core 2 Duo 프로세서 등을 사용하고 있습니다. x64 JDK를 사용하고 있습니다. 저는 NOD32 Antivirus를 사용합니다. 컴퓨터 성능이 최고이기 때문입니다.
작업 관리자에서 netbeans.exe는 20Mb 이하, java.exe는 600Mb 이상 만 표시합니다.
내 프로젝트는 J2EE 웹 응용 프로그램이며 500 개 이상의 클래스이며 프로젝트 라이브러리 만 포함되지 않습니다 (외부). 느리다고 말하면 3 분, 4 분, 5 분 또는 그 이상의 Netbeans가 얼 었음을 의미합니다.
오류 경고, svn 상태 등과 같은 파일 상태를 가져 오기 위해 모든 파일을 읽어야하는 경우 내 프로젝트가 Netbeans에 비해 너무 큽니까? 이 모든 것을 비활성화 할 수 있습니까? 파일을 열 때만 스캔하도록 설정할 수 있습니까?
내 CPU 사용률은 일반적으로 모든 도구를 연 상태에서 30 %입니다. 즉, Netbeans, MS SQL 관리자, 메모장, XMLSpy, 작업 관리자, Delphi, VirtualBox를 의미합니다. Netbeans는 가상화 된 시스템보다 더 많은 RAM을 사용합니다.
Linux에서는 동일한 컴퓨터 (Ubuntu 8.04 x64)의 Windows 에서처럼 느립니다.
Netbeans 팀이 시작 속도를 향상시킨 것은 사실이지만 열면 모두 캐시하기 시작합니다.
일부 JVM 매개 변수를 사용하여 높은 메모리 사용량을 설정했습니다. "C:\Program Files\NetBeans Dev\bin\netbeans.exe" -J-Xms32m -J-Xmx512m -J-Xverify:none -J-XX:+CMSClassUnloadingEnabled
그러나 여전히 느립니다.
NetBeans 또는 Eclipse IDE가 너무 많은 메모리를 사용하는 것처럼 보이는 문제에 대한 매우 간단한 솔루션 :
- 사용하지 않는 플러그인을 비활성화하십시오.
- 작업하지 않는 프로젝트를 닫습니다.
Linux Mint와 Ubuntu 상자에서 Netbeans 7.0과 유사한 문제에 직면했습니다. Netbeans는 700MiB 이상의 공간과 50-80 % CPU를 사용했습니다. 그런 다음 청소를하기로 결정했습니다. 30 개의 플러그인을 설치했는데 대부분을 사용하지 않았습니다. 그래서 저는 제가 사용하지 않는 플러그인을 비활성화했습니다. 무려 19 개의 플러그인을 비활성화했습니다. 이제 메모리는 400MiB 이상을 사용하고 CPU는 10까지, 최대 50 %까지 사용합니다.
이제 내 삶이 훨씬 쉬워졌습니다.
수직으로 확장 할 수있는 한 NB 설치를 최적화하는 데 시간을 투자하지 마십시오. SSD (및 일반적으로 더 빠른 하드웨어)를 확보하십시오.
또한:
- 모든 관련 폴더 (예 : 프로젝트 디렉토리, 임시 디렉토리)에 대한 예외를 바이러스 백신 소프트웨어에 추가하십시오 (또는 더 나은 방법은 제거하는 것입니다).
- 프로젝트에 네트워크 드라이브를 사용하지 마십시오
- 홈 드라이브가 로컬인지 확인
- (예를 들어, 당신의 IDE가 아닌 로컬 폴더를 사용하는 경우 확인
%AppData%
)
- 최신 Netbeans 다운로드
- 필요하지 않은 모든 플러그인을 제거하십시오.
- 최신 버전의 Java 사용
다음 JVM 옵션을 사용하여 NetBeans로드 / 실행 속도를 높일 수 있습니다.
JVM 옵션 : -J-Xverify:none
- 이 옵션은 JVM이 클래스로드 중에 바이트 코드를 확인하지 않도록 지시하고 불필요한 클래스를 미리로드하지 않도록합니다.
설정 방법 :
파일 편집 C:\Program Files\NetBeans <version>\etc\netbeans.conf
(다른 위치에 설치 한 경우 NetBeans 설치 폴더 확인)
말하는 줄 찾기
netbeans_default_options = "..."
옵션
-J-Xverify:none
목록에 옵션 을 추가하십시오 .NetBeans를 다시 시작하십시오.
Git, Subversion, Local History, Spell checker 및 기타 사용하지 않는 플러그인 비활성화
회사 Windows 시스템입니까? 너무 공격적인 바이러스 스캐너가 최신 IDE의 속도를 늦출 수 있습니다. 작업 관리자에서 많은 CPU 또는 디스크 읽기를 사용하는 프로세스를 확인하십시오.
Sun의 Windows 용 Java Virtual Machine은 공유 메모리를 사용하지 않는다는 점에 유의해야합니다. 즉, VM에 더 많은 힙을 제공할수록 더 많은 메모리를 자체적으로 유지합니다. 더 많은 힙의 장점은 가비지 수집이 적고 실행중인 Java 애플리케이션의 성능이 더 빠르다는 것입니다. 그러나 단점은 다른 애플리케이션이 작업 할 메모리가 적고 이로 인해 시스템이 느려질 수 있다는 것입니다.
저는 Windows 7을 사용합니다. NetBeans 바로 가기를 마우스 오른쪽 단추로 클릭하고 속성으로 이동 한 다음 대상의 바로 가기 탭에서 -J-Xmx1024m -J-Xms256m
.
JVM의 메모리 사용량을 설정합니다. Xms는 최소값이고 Xmx는 최대 값입니다.
다음은 대상 텍스트 필드의 값입니다.
"C:\Program Files\NetBeans 7.1\bin\netbeans.exe" --jdkhome "C:\Program Files\Java\jdk1.6.0_10" -J-Dorg.netbeans.modules.php.dbgp.level=400 -J-Xmx1024m -J-Xms256m
이 속성을 추가했기 때문에 NetBeans가 너무 빨리 실행됩니다!
etc
아래 의 디렉토리에서 Netbeans-Home
파일 netbeans.conf
파일을 편집 하십시오. -Xms
및 -Xmx
증가해야 프로그램이 컴파일 할 수 있도록 값으로.
netbeans.conf의 지침 :
# Note that default -Xmx and -XX:MaxPermSize are selected for you automatically.
# You can find these values in var/log/messages.log file in your userdir.
# The automatically selected value can be overridden by specifying -J-Xmx or
# -J-XX:MaxPermSize= here or on the command line.
netbeans_default_options 문자열에 값을 입력하십시오 . 예 :
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -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-Dsun.awt.disableMixing=true -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd --laf Nimbus"
메모리 창 속도를 높이거나 늘리기 위해 수행 할 작업 :
Windows 업데이트 비활성화 :
- 작업 관리자를 열고 서비스 탭을 열고 Windows 업데이트를 비활성화하십시오.
- 히트 Ctrl + R 를 입력
Services.msc
하고 Enter 키를 입력합니다.- 정렬 기준
Startup Type
- 를 실행하는 타사 (Windows 이외)의 서비스를 선택하고
Automatic
, 마우스 오른쪽 버튼을 클릭Properties
하고 , 시작 유형을Manual
- 정렬 기준
- Sort by
Status
and Stop services from (3rd party) app you think unused
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).
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!
If its on a corporate machine - make sure that the caches aren't stored on the network
In order to improve Netbeans startup and build times one should (in this order):
- Make sure that one has enough free RAM memory (4GB Windows is enough on my 64-bit system)
- 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!)
- 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!)
- Buy the fastest processor you can get your hands on.
I had the same problem with Netbeans being so slow, but it is now much better after deactivating the SVN plug-in. I think that may help.
Good luck
This works for me:
netbeans_default_options="-J-client -J-Xverify:none -J-Xmx1024m -J-Xss2m -J-Xms256m -J-XX:PermSize=32m -J-Dnetbeans.logger.console=true -J-ea -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-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes"
Settings in the etc/netbeans.conf
.
Really useful article about reasons why your NetBeans is slow:
http://wiki.netbeans.org/FaqSlowNetBeans
A more or less detailed description, why NetBeans if slow so often can be found in the article:
Boost your NetBeans performance
First. check what NetBeans is actually doing on your disk. On a Mac you can issue this command:
sudo fs_usage | grep /path/to/workspace
In my special case I got a directory which didn't exist any longer, but NetBeans tries to access the folder all the time:
14:08:05 getattrlist /path/to/workspaces/pii 0.000011 java
Repeated many, many, many times. If you have a similar problem, fix it by deleting your NetBeans cache folder here:
~/.netbeans/6.8/var/cache
If your NetBeans.app is still making a lot of disk I/O. Check if it's accessing the subverison folders and svncache.
I had to disable the subversion features with config file:
~/.netbeans/VERSION/config/Preferences/org/netbeans/modules/versioning.properties
add a line:
unversionedFolders=FULL_PATH_TO_PROJECT_FOLDER
SOURCE: Netbeans forums
IMHO it's mainly related to a lot of disk I/O caused by missing files or folders and svncache.
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.
Similar to the suggestion to put everything on an SSD.
I run netbeans from freeBSD. The netbeans cache files were in my home directory in .netbeans. My home directory was mounted over nfs so access was very slow. Moving .netbeans to the local machine greatly improved performance. I added a softlink from .netbeans in my home directory to the local directory. Netbeans describes how to change the usedir and cachedir here and lists this as a reason under item 4.
Prior to this I could write entire sentences in comments before the gui caught up and displayed them. After text appears as I type.
Simplest solution:
Go to Preferences->Editor and Disable: Auto Popup Completion Window
Use: Meta key + \ instead when you need code completion.
The biggest problem I found was the auto code completion feature. As I typed, it kept on trying to run code completion the whole time. This was causing really slow performance since my project has a lot of libraries that it depends upon.
The best thing of all is you can stop fighting the editor as it keeps picking up false positives in the completion popup.
Have not looked back since I switched this off.
NetBeans 8.0.2 (PHP) has two problems: the SubVersion client and the Twig templates. In order to drastically improve overall performance, a) disable teh "Twig Templates" plugin (this will also deactivate Symphony2, in case you may require it) and b) override the SVN client with this switch:
run.args.extra=-J-DsvnClientAdapterFactory=commandline
^ project.properties lets one define the CLI arguments individually (which may also make sense with RAM settings and other customization). guess one could re-enable Twig once that linked bug-report has been closed. re-scanning isn't really the issue, while the rescan performs as it should ...in a timely manner.
Just was testing some more and noticed, that on Linux it runs way smoother with the Oracle JDK than the (common) OpenJDK - have seen there is even one version of NetBeans bundled with it.
Put your .netbeans Homefolder into a Ramdisk and Netbeans its going to be incredible fast.
I detected on my Ubuntu 16.04 that every Key-Press causes a HDD read or write action. Reason enougth for me to use a Ramdisk. As a little positive side-effect my HDD is quite now (no tickclickrrickrrrticktick any more) and has a longer live.
Had the same issue with Netbeans 7.3.* and 7.4 Beta on Windows 7. Switching some plugins on and off, I figured out it was the svn plugin which boosted the CPU constantly to about 27%, converting my laptop into a toaster. Turn it off and code happy again :)
For Windows - Should work for other OS as well
Netbeans is just like any other java application which requires tuning for its JVM.
Please read the following link to have some benchmark results for netbeans
https://performance.netbeans.org/reports/gc/
The following settings works fine in my Windows 7 PC with 4GB RAM and I5 Quad core processor.
(Check for the line netbeans_default_options in the netbeans config file inside bin folder and replace the config line as follows)
netbeans_default_options="-XX:TargetSurvivorRatio=1 -Xverify:none -XX:PermSize=100M -Xmx500m -Xms500m -XX+UseParallelGC ${netbeans_default_options}"
Small Suggestion: Garbage collection plays a vital part in JVM heap size and since I had a quad core processor, I used Parallel GC. If you have single thread processor, please use UseSerialGC. From my experience, if Xmx Xms values are same, there is no performance overhead for JVM to switch between min and max values. In my case, whenever my app size tries to exceed 500MB, the parallel GC comes in handy to cleanup unwanted garbage so my app never exceed 500MB in my PC.
For me worked out to enable auto-scanning of sources.
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
Open the file:
/Applications/NetBeans/NetBeans\ 8.0.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
I added some options shown below:
netbeans_default_options="-J-Dsun.java2d.opengl=true -J-Dsun.java2d.d3d=false -J-Xmx2048m ...
Using opengl may help you, depending on your system. I am running OsX. 2048m may be too much, but does not seem to hurt :-) ...
Try to profile Netbeans using VisualVM. If the "hot spot" is org.gnome.accessibility.atkwrapper.emitsignal(), try to run Netbeans with
-J-Djavax.accessibility.assistive_technologies=" "
It helped a lot in my case.
I don't really know why exactly this toolkit used, but looks like it's generally safe to disable it.
프로젝트 폴더에 프레임 워크 파일 또는 라이브러리 (예 : Laravel에는 폴더 공급 업체가 있음)가 포함 된 폴더가 있는지 확인하십시오. "프로젝트"> 속성을 클릭합니다. 왼쪽에서 "폴더 무시"를 선택합니다 (영어로 된 방법은 없지만 '프레임 워크'앞에 있음). 오른쪽에서 "폴더 추가"를 클릭하고 폴더를 선택하면 Netbeans 8이 더 빨라집니다. 그것은 나를 위해 작동합니다.
참고 URL : https://stackoverflow.com/questions/229763/how-to-improve-netbeans-performance
'Programming' 카테고리의 다른 글
NuGet 자동 패키지 복원이 MSBuild에서 작동하지 않음 (0) | 2020.08.10 |
---|---|
제약 조건이 높이 0을 모호하게 제안하는 경우 감지 (0) | 2020.08.10 |
PhoneGap Eclipse 문제-eglCodecCommon glUtilsParamSize : 알 수없는 매개 변수 오류 (0) | 2020.08.09 |
웹 사이트를위한 단순 / 최소한 browserconfig.xml은 무엇입니까? (0) | 2020.08.09 |
목록의 각 요소에 정수를 추가하는 방법은 무엇입니까? (0) | 2020.08.09 |