Development Tip

NetBeans 스캔 프로젝트를 중지하는 방법이 있습니까?

yourdevel 2020. 11. 14. 11:14
반응형

NetBeans 스캔 프로젝트를 중지하는 방법이 있습니까?


내 PC에 메모리가 많지 않고 프로세서가 매우 약합니다. netbeans는 내가 가장 좋아하는 IDE이지만 프로그램을 열면 자동으로 시작되는 프로젝트 스캔으로 인해 현재 컴퓨터에서 사용하기가 거의 견딜 수 없습니다.

netbeans가 프로젝트를 스캔하는 것을 방지하는 방법이 있습니까?


Hey George이게 답인지 모르겠지만 열 필요가없는 프로젝트를 마우스 오른쪽 버튼으로 클릭하고 '닫기'를 선택합니다. 과거의 모든 프로젝트가 여기에 나열되는 것은 의미가 없습니다. 개발중인 제품을 공개하십시오. 메뉴에서 언제든지 다른 프로젝트를 다시 열 수 있습니다. 사용하지 않는 모든 프로젝트가 닫히면 Netbeans를 시작할 때마다 스캔되지 않습니다.


실제로 작업하는 폴더에 대해 더 작은 프로젝트 를 만든 다음이 를 그룹화 할 프로젝트 그룹 (Mateng)을 만드는 것 외에도 images폴더 등과 같이 작업하지 않을 폴더를 제외 할 수 있습니다 . 이러한 폴더를 무시하려면 다음으로 이동하십시오.

File > Project Properties > Ignored Folders > Add Folder...

NetBeans 도움말에서 :

Ignored Files 속성은 Include Path의 반대입니다. FTP 업로드, 스캔 등을 위해 IDE가 무시하도록하려는 PHP 프로젝트 내의 파일입니다 .


이것을 시도하십시오 : http://wiki.netbeans.org/ScanOnDemand

경고 : 현재이 플러그인은 개발 빌드에서만 작동합니다. 이 지침을 공식 릴리스와 함께 사용하지 마십시오 ...

NetBeans IDE를 시작하자마자 시스템은 변경된 파일이 없는지 확인하기 위해 "최신 확인"을 수행합니다. 귀하의 경우에 너무 오래 걸리고 작업을 수행 할 수없는 경우 ScanOnDemand에 관심이있을 수 있습니다 .

ScanOnDemand 의 가장 기본적인 기능은 IDE 시작 후 최신 확인 기능 을 비활성화하는 것입니다. 이는 소스에 대한 대부분의 작업이 IDE 내부에서 수행되므로 IDE가 종료 될 때 중요한 변경이 발생하지 않으므로 아무것도 다시 검색 할 필요가 없다는 가정하에 수행됩니다. 실제로 이것은 완전히 정확하지 않을 수 있지만 다른 도구를 사용하여 소스를 대폭 업데이트하는 드문 상황에서 수동으로 새로 고침을 트리거하는 드문 상황에서 쉽게 수정할 수 있습니다.

다시 한번 NetBeans IDE는 더 많은 제어를 제공합니다. 당신은 책임을지고 언제 무엇을 해야할지 결정합니다.

이 영역을 돕기 위해 업데이트 센터에서 사용할 수있는 실험용 모듈을 만들기로 결정했습니다 (릴리스 6.7 기준). 모듈은 특정 상황에서 자동 업데이트를 생략합니다 (예 : 시작 후 및 기본 창으로 전환 후 최신 확인). 재검색을 호출하여 데이터를 최신 상태로 만드는 책임은 명시 적 새로 고침 작업을 통해 사용자에게 있습니다.


나는 이것이 오래된 질문이라는 것을 알고 있지만 이것은 다른 사람들에게 도움이 될 수 있습니다 ... 백그라운드 검색을 활성화하거나 비활성화하려면 메뉴 도구-> 옵션-> 기타-> 파일에서 옵션을 찾을 수 있습니다.

https://blogs.oracle.com/netbeansphp/entry/enable_auto_scanning_of_sources


불필요한 프로젝트 (David) 닫는 것 외에도 관련 프로젝트 (또는 하나만)를 포함하는 프로젝트 그룹을 만들 수 있습니다.

File > Project Group > New Group....

그런 다음 동일한 메뉴에서 프로젝트 그룹을 가리켜 열 수 있습니다. 무엇보다도 각 그룹은 마지막으로 편집기 창에서 열었던 파일을 기억합니다. 모든 프로젝트를 그룹으로 구성하고 스캔을 크게 줄입니다.

(btw : 도구 모음에 대한 프로젝트 그룹 바로 가기를 제공하는 편리한 플러그인이 있습니다. )

편집 : 저는 또한 한동안 주문형 스캔을 사용 하고 있습니다. 정말 좋습니다. 그 대답에 대한 찬사.


NetBeans 스캔 프로젝트 중지 :

   Menu -> Tools -> Options -> Miscellaneus -> Files -> Uncheck Enabel auto-scanning

Netbeans 스캔 프로젝트 중지


프로젝트 스캔을 비활성화 할 수 있는지 여부를 모르겠습니다. 가능하더라도 다시 제대로 작동하지 않을까 의심됩니다. 내가 한 몇 가지 팁이 있으며 Netbeans의 속도를 높입니다.

  1. 작업 창을 닫습니다. 이것은 Netbeans가 주석에서 TODO를 스캔하는 것을 방지합니다.
  2. * .jar, java 폴더 및 netbeans 폴더에 대한 바이러스 검사를 제외합니다. 이것은 내 netbeans를 많이 가속화합니다.

Netbeans는 많은 메모리를 소비하므로 메모리를 추가하면 성능도 향상됩니다 (OS는 메모리가 부족할 때 메모리와 페이지 파일 사이를 스왑 할 필요가 없습니다) (하지만 이것은 아마도 옵션이 아닐 것입니다). 또한 Netbeans는 시작할 때로드해야하는 수백 개의 파일로 구성되어 있으므로 하단 목은 하드 디스크의 속도입니다.


들어 넷빈즈 8. * +ScanOnDemand 에서 플러그인 Zeophlite의 대답은 작동하지 않습니다. 대신 MasterFileSystemSuspend사용하십시오. 현재 상태이고 안정적인 릴리스에서 제대로 작동합니다.

NetBeans IDE 가 변경 사항에 반응하는시기와 변경 사항을 무시하는시기 를 제어하는 ​​플러그인 입니다. 추가 사용자 작업으로 저장시 컴파일에 유용한 추가 기능-IDE를 일시 중단 모드로 설정하면 명령 줄 작업을 수행 (및 완료) 한 다음 IDE를 켤 수 있습니다.

플러그인의 코드는 main / contrib 저장소에 있습니다. 플러그인을 다운로드 할 수 있습니다 미디어 : 조직-넷빈즈 - 모듈 - masterfs-suspend.nbm 설치 (도구 / 플러그인 / 다운로드 한)에 넷빈즈 8.0, 8.1, 8.2 .

여기에 이미지 설명 입력

설치 후 도구 모음에 새 아이콘이 나타납니다.이 아이콘을 클릭하면 IDE에서 수행 한 자동 새로 고침을 일시 중단 할 수 있습니다. NetBeans 8.2 이상에서 Truffle 소스로 작업 할 때 매우 유용합니다.

이 모듈은 이전 ScanOnDemand 모듈을 편리하게 대체 합니다.


개인적인 메모에서 이것은 유휴 상태에서 일반적인 사용을위한 netbeans 메모리 소비를 20GB 이상에서 지속적으로 약 2GB로 줄였으며, 특히 매우 큰 프로젝트 또는 많은 심볼릭 링크가있는 스캐너에서 지속적으로 메모리가 중단되고 누수되는 경우 좋은 해결 방법을 제공합니다. .


또 다른 빠른 작업은 프로젝트 내의 nbproject 폴더를 삭제 한 다음 NeteBeans를 엽니 다. 그런 다음 프로젝트가 목록에서 제거됩니다. 이게 얼었을 때 몇 번 해


이 문제도 우연히 발견했습니다.

가장 간단한 것은 netbeans 구성을 편집하여 모든 프로젝트를로드하지 않도록하는 것입니다. 메뉴에서 언제든지 다른 프로젝트를 다시 열 수 있습니다. 사용하지 않는 모든 프로젝트가 닫히면 netbeans를 시작할 때마다 스캔되지 않습니다.

해결책 : etc 폴더 아래에있는 netbeans.conf에서 다음 줄을 변경하십시오.

# $ {HOME}은 JVM user.home 시스템 속성 netbeans_default_userdir = "$ {HOME} /. netbeans / changeme"로 대체됩니다.


netbean 8.2에서도 동일한 문제에 직면합니다. 방금 프로젝트를 삭제했습니다.-프로젝트를 마우스 오른쪽 버튼으로 클릭-프로젝트 삭제 (소스 코드 삭제 옵션 선택 취소 유지). -다시 새 프로젝트 만들기

이제 완벽하게 작동합니다.

그 일을 바랍니다.


이 Netbeans 플러그인을 사용해보십시오. 이것은 일부 확장에 대한 부하를 줄입니다.

http://wiki.netbeans.org/ScanOnDemand


정확히 질문의 경우는 아니지만 가끔 Netbeans를 다시 시작하여 "프로젝트 스캔"을 중지 할 수 있습니다.


제 경우에는 jdk 1.8에서 여러 정적 가져 오기가있을 때 큰 문제가 있습니다 (예제 참조). javac에 문제가있는 것 같습니다. 이러한 .java 파일을 검사 할 때 컴파일러가 매우 느리고 NetBeans 스캔이 매우 느립니다. 정적 가져 오기를 반복 할 때마다 컴파일 및 스캔 시간이 매우 빠르게 증가하는 것 같습니다. 따라서 귀하의 경우에는 반복되는 가져 오기를 제거하십시오.

package ru.cntp.demo;

import java.math.BigDecimal;

import static java.util.Arrays.asList;
import java.util.List;
import java.util.Map;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.groupingBy;

/**
 *
 * @author sergiu
 */
public class EmployeeRepository {

    public Map<Department, Map<String, Map<String, Map<String, Map<BigDecimal, List<Employee>>>>>> getEmployeesByDepartment() {

        Country germany = new Country("Germany");

        Department germanyDeptOne = new Department("Dept One", germany);

        Employee emp1 = new Employee("Surame", "Name", "Patronymic", BigDecimal.TEN, germanyDeptOne);


        return asList(emp1).stream()
                .collect(groupingBy(Employee::getDepartment,
                        groupingBy(Employee::getSurname,
                                groupingBy(Employee::getName,
                                        groupingBy(Employee::getPatronymic,
                                                groupingBy(Employee::getSalary))))));
    }

}

Scanning performance of Netbeans can be improved using the following procedure :
1) Go to Window-->Files. This opens the Files Tab.
2) In the Files Tab for each opened project open the nbproject folder and inside it open the project.properties file.
3) Now in this file below the property "excludes" there are file references listed for all your referred Libraries (JARs)
4) There might be some repeated file references with paths that may be old or on someone else's machine(if you are working in a group and transferred projects from someone's machine)
5) Delete those old path references.
Example -
excludes=
file.reference.xyz.jar=../not/correct/path.jar //delete this line
file.reference.xyz.jar-1=../correct/path.jar //remove -1
....
includes=**

6)Also locate the property "javac.classpath" and delete the unnecessary classpath entries corresponding to the deleted references as described above.
Example -
javac.classpath=\
${file.reference.xyz.jar}:\ //delete this line
${file.reference.xyz.jar-1}:\ //remove -1
....
javac.compilerargs=

7) So now the file reference mentioned in the file reference section and the javac.classpath property is same and points to a valid Library (JAR) address on your machine or network.
Example -
excludes=
file.reference.xyz.jar=../correct/path.jar //the correct reference & path
....
includes=**
....
javac.classpath=\
${file.reference.xyz.jar}:\ //the correct classpath entry for reference
....
javac.compilerargs=
....

The reason the above procedure worked (in my case) is because it prevents Netbeans from scanning unnecessary Library paths that may not be present on your machine/network.


Plugin download - Direct Download

http://wiki.netbeans.org/wiki/images/c/cc/Org-netbeans-modules-scanondemand.nbm


I have the quickest and easiest way.

Just put the netbeans metadata to another location instead of putting it on the project directory


If your project is a Maven structured project you can use a simple trick to make your and NetBeans life a lot easier.

I have my projects inside of c:\dev on my machine. That's the place where Netbeans is working with. If I build in this folder then NetBean's background process get very busy.

But if I copy the c:\dev\trunk project for example to c:\deploy\trunk before I start mvn clean install inside of c:\build\trunk then NetBeans does not need to scan the changes that happen in this folder. It does not know about it.

I use on a windows machine:

robocopy c:\dev\trunk c:\deploy\trunk /MIR /NFL /NS /NC /NDL /XD ".svn"

It is a windows native command. No additional installation necessary.

It helped me a lot decrease build time and also to avoid never ending scans on Netbeans.

If you use tools like JRebel you can still work like this when you update the changed classes to your c:\deploy\trunk folder. You can use the same command.

It is of course a bit of a workaround, but it helps a lot. :-)


My project became Very Big over time

In the below 2 cases, it is too slow:

  1. While opening NetBeans project - this is too slow
  2. Automatic scanning of NetBeans project

What did not work for me are:
1. Doing Window > Reset Windows only solves temporarily
2. Sometimes felt my GIT repository integration with Netbeans is the main issue, but there was no clear proof for it

Solution for 1):

Run below commands:

WARNING Below commands have automated delete commands

Close the Netbeans IDE
cd %USERPROFILE%\AppData\Local\NetBeans\Cache\                  && del /s /q .\  && rmdir /s /q .\
cd %USERPROFILE%\AppData\Roaming\NetBeans\8.2\var\filehistory\  && del /s /q .\  && rmdir /s /q .\
cd %USERPROFILE%\AppData\Roaming\NetBeans\8.2\var\log           && del /s /q .\  && rmdir /s /q .\

And, the problem 1) is now rarely comes up, other times Netbeans loads almost immediately.

Solution for 2):

root
....f1
........f11
........f12
....f2
........f21
........f22

root is a folder and also it's the main NetBeans project
f1, f2 are just folders
f11, f12, f21, f22 are sub-folders that are also NetBeans projects too

Earlier, I was opening root Netbeans project, and the system became too slow due to netbeans scanning the whole project from root, and antivirus was working very hard to cooperate with Netbeans project scanning, result everything in system gets slow.

Now, the solution is open sub-projects like f11, f12, f21, f22, etc. you can open many small sub-project, the Netbeans project scanning issue is fully gone.


My Netbeans 8.0.2 would crash on my Macbook pro due to "Scanning projects..." hogging up my CPU. I couldn't stop the process, however, I could make the process finish quicker by increasing the Java heap memory in netbeans.conf.

$ vi /Applications/NetBeans/NetBeans\ 8.0.2.app/Contents/Resources/NetBeans/etc/netbeans.conf

Replace this:

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"

with:

netbeans_default_options="-J-client -J-Xss2m -J-Xms2048m -J-Xmx2048m -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"

This below solved it for me. One project when opened would cause never ending background scanning... this would also mean the code completion etc could never work. My machine was devoting a huge amount of resources to this.

Someone here gave me the clue: right click the project, choose properties, then "Ignored Folders".

Essentially I used this to determine which (specific) folder was the cause of the scanning. I selected the first half, then the second half of the remaining etc a process of elimination... and out of hundreds of folders, I found a (php HMVC view folder that caused it) ... I needed to stop and kill the scanning, then re-start many times...

Here is the easiest way for various reasons:

"폴더 무시"영역에서 모든 폴더를 선택하고 무시 목록에 모두 (공정하게 개별적으로) 추가합니다. 그런 다음 IDE를 종료하고 다시 시작하십시오. 모든 백그라운드 검색이 없으면 (일반적으로 몇 초 / 분 동안 시작되고 실행 됨) 폴더 중 하나 또는 몇 개를 제거하기 시작합니다. 제거 할 때마다 속성 창을 닫습니다 ...... IDE는 제거 된 폴더를 빠르게 검색하고 해당 폴더에 문제가 없으면 검색을 중지합니다. 범인 폴더를 방금 제거한 경우 스캔이 끝나지 않습니다.

참고 URL : https://stackoverflow.com/questions/4515622/is-there-a-way-to-stop-netbeans-scanning-projects

반응형