|
| 1 | +--- |
| 2 | +title: "IntelliJ IDEA Indexing 기능 비활성화" |
| 3 | +date: "2022-02-08" |
| 4 | +tags: ["Etc"] |
| 5 | +summary: "Disable the auto-indexing function and perform manual indexing" |
| 6 | +description: "자동 인덱싱 기능을 비활성화하고 수동 인덱싱하기" |
| 7 | +--- |
| 8 | + |
| 9 | + |
| 10 | +:::info |
| 11 | +Intellij IEDA 의 indexing은 IDE 의 핵심 기능인 코드 완성, 검사, 사용법 찾기, 탐색, 구문 강조 표시 및 리팩토링을 담당한다. |
| 12 | +프로젝트를 열 때, branch 를 전환, plug-in 을 load 하거나, 대규모 외부 파일 업데이트가 시작된다. |
| 13 | +하지만, indexing 이 무한 로딩이 되는 경우도 있고, 많은 시간이 걸리는 경우도 발생한다. |
| 14 | +indexing 에 필요한 시간은 프로젝트에 따라 다르고, 프로젝트가 복잡할수록 indexing 하는데 시간이 더 걸린다. |
| 15 | +인덱싱을 빠르게 하는 방법은 여러가지가 있지만, Auto Indexing 기능을 비활성화하고 수동 Indexing 하는 방법에 대해서 알아보자. |
| 16 | +( IntelliJ IDEA 2021.3.2 Ultimate Edition ) |
| 17 | +::: |
| 18 | + |
| 19 | + |
| 20 | +### 파일 및 폴더 제외 |
| 21 | +--- |
| 22 | + |
| 23 | +동적으로 생성된 파일이나 폴더를 제외하여 인덱싱 및 전체 IDE 성능을 높일 수 있다. |
| 24 | + |
| 25 | +**File > Settings > Build, Execution, Deployment - Compiler - Excludes** 에서 [+] 버튼을 눌러서, 폴더 또는 파일을 지정한다. |
| 26 | + |
| 27 | +<div style={{ textAlign: 'center' }}> |
| 28 | + <img src="/img/post/etc/intellij-indexing/settings.png" alt="settings" style={{ display: 'inline-block' }} /> |
| 29 | +</div> |
| 30 | + |
| 31 | + |
| 32 | +### 인덱싱 기능 비활성화 |
| 33 | + |
| 34 | +--- |
| 35 | + |
| 36 | +**File > Settings > Appearance & Behavior > System Settings** 에서 **synchronize external changer when switching to the IDE window or opening an editor tab** 체크 해제 |
| 37 | + |
| 38 | + |
| 39 | +<div style={{ textAlign: 'center' }}> |
| 40 | + <img src="/img/post/etc/intellij-indexing/synchronize-off.png" alt="settings" style={{ display: 'inline-block' }} /> |
| 41 | +</div> |
| 42 | + |
| 43 | + |
| 44 | +### Invalidate Caches |
| 45 | +--- |
| 46 | + |
| 47 | +모든 프로젝트에 대해 많은 수의 파일을 캐시하므로, 시스템 캐시가 과부하 될 수도 있다. |
| 48 | + |
| 49 | +**File > Invalidate Caches..** |
| 50 | + |
| 51 | +<div style={{ textAlign: 'center' }}> |
| 52 | + <img src="/img/post/etc/intellij-indexing/invalidate-caches.png" alt="invalidate-caches" style={{ display: 'inline-block' }} /> |
| 53 | +</div> |
| 54 | + |
| 55 | + |
| 56 | +### 수동 인덱싱 |
| 57 | +--- |
| 58 | + |
| 59 | +파일 및 폴더 제외 하거나, 인덱싱 기능 비활성화를 하면 수동으로 인덱싱을 해줘야 하는 경우가 있다. |
| 60 | +* ex) git pull 했을 때 새로 생긴 파일이 있을 경우 등 |
| 61 | + |
| 62 | + |
| 63 | +<div style={{ textAlign: 'center' }}> |
| 64 | + <img src="/img/post/etc/intellij-indexing/reload-all-from-disk.png" alt="reload-all-from-disk" style={{ display: 'inline-block' }} /> |
| 65 | +</div> |
| 66 | + |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +### 📚 Reference |
| 71 | + |
| 72 | +* [Intellij Indexing](https://www.jetbrains.com/help/idea/indexing.html) |
| 73 | +* [Intellij invalidate Caches](https://www.jetbrains.com/help/idea/invalidate-caches.html) |
0 commit comments